From f7d96da58556c00d1c365df500608f8d0c368db2 Mon Sep 17 00:00:00 2001 From: Jonathan Frederic Date: Fri, 18 Oct 2013 20:35:09 +0000 Subject: [PATCH] Added toggle button view --- .../html/static/notebook/js/widgets/bool.js | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/IPython/html/static/notebook/js/widgets/bool.js b/IPython/html/static/notebook/js/widgets/bool.js index 405a721a0..104ec7c71 100644 --- a/IPython/html/static/notebook/js/widgets/bool.js +++ b/IPython/html/static/notebook/js/widgets/bool.js @@ -45,4 +45,48 @@ require(["notebook/js/widget"], function(){ }); IPython.notebook.widget_manager.register_widget_view('CheckboxView', CheckboxView); + + var ToggleButtonView = IPython.WidgetView.extend({ + + // Called when view is rendered. + render : function(){ + this.$el + .html('') + .addClass(this.model.comm.comm_id); + + this.$button = $('