From a152a481d073064b3f09e1fb99c7aaac6eced76c Mon Sep 17 00:00:00 2001 From: Min RK Date: Thu, 15 Jan 2015 12:15:19 -0800 Subject: [PATCH 1/2] don't set bootstrap toggle on ToggleButtonsWidget model update already toggles active and data-toggle does the same, so clicking on a toggle toggles twice, setting it back to the original value. --- IPython/html/static/widgets/js/widget_selection.js | 1 - 1 file changed, 1 deletion(-) diff --git a/IPython/html/static/widgets/js/widget_selection.js b/IPython/html/static/widgets/js/widget_selection.js index 31bd3dfdf..f00e79933 100644 --- a/IPython/html/static/widgets/js/widget_selection.js +++ b/IPython/html/static/widgets/js/widget_selection.js @@ -287,7 +287,6 @@ define([ .hide(); this.$buttongroup = $('
') .addClass('btn-group') - .attr('data-toggle', 'buttons-radio') .appendTo(this.$el); this.model.on('change:button_style', function(model, value) { From 9d78b0dae6a1ce479fce3e592c086fb58bb4b6a8 Mon Sep 17 00:00:00 2001 From: Min RK Date: Thu, 15 Jan 2015 13:34:16 -0800 Subject: [PATCH 2/2] toggle-buttons test --- IPython/html/tests/widgets/widget_selection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IPython/html/tests/widgets/widget_selection.js b/IPython/html/tests/widgets/widget_selection.js index 68d2c6a1e..94b433c20 100644 --- a/IPython/html/tests/widgets/widget_selection.js +++ b/IPython/html/tests/widgets/widget_selection.js @@ -7,7 +7,7 @@ casper.notebook_test(function () { this.execute_cell_then(index); var combo_selector = '.widget-area .widget-subarea .widget-hbox .btn-group .widget-combo-btn'; - var multibtn_selector = '.widget-area .widget-subarea .widget-hbox .btn-group[data-toggle="buttons-radio"]'; + var multibtn_selector = '.widget-area .widget-subarea .widget-hbox.widget-toggle-buttons .btn-group'; var radio_selector = '.widget-area .widget-subarea .widget-hbox .widget-radio-box'; var list_selector = '.widget-area .widget-subarea .widget-hbox .widget-listbox';