diff --git a/IPython/html/static/style/ipython.min.css b/IPython/html/static/style/ipython.min.css index aa541e8..af4b463 100644 --- a/IPython/html/static/style/ipython.min.css +++ b/IPython/html/static/style/ipython.min.css @@ -1277,32 +1277,6 @@ div.cell.text_cell.rendered { } /* THE CLASSES BELOW CAN APPEAR ANYWHERE IN THE DOM (POSSIBLEY OUTSIDE OF THE WIDGET AREA). */ -.widget-hlabel { - /* Horizontal Label */ - min-width: 10ex; - padding-right: 8px; - padding-top: 5px; - text-align: right; - vertical-align: text-top; -} -.widget-vlabel { - /* Vertical Label */ - padding-bottom: 5px; - text-align: center; - vertical-align: text-bottom; -} -.widget-hreadout { - padding-left: 8px; - padding-top: 5px; - text-align: left; - vertical-align: text-top; -} -.widget-vreadout { - /* Vertical Label */ - padding-top: 5px; - text-align: center; - vertical-align: text-top; -} .slide-track { /* Slider Track */ border: 1px solid #CCCCCC; @@ -1522,69 +1496,11 @@ div.cell.text_cell.rendered { /* ComboBox Main Button */ min-width: 125px; } -.widget-box { - /* The following section sets the style for the invisible div that - hold widgets and their accompanying labels. - - Looks like this: - +-----------------------------+ - | widget-box (or similar) | - | +-------+---------------+ | - | | Label | Actual Widget | | - | +-------+---------------+ | - +-----------------------------+ - */ - margin: 5px; - /* Old browsers */ - -webkit-box-pack: start; - -moz-box-pack: start; - box-pack: start; - /* Modern browsers */ - justify-content: flex-start; - /* Box */ - box-sizing: border-box; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - /* Old browsers */ - -webkit-box-align: start; - -moz-box-align: start; - box-align: start; - /* Modern browsers */ - align-items: flex-start; +.widget_item .dropdown-menu li a { + color: inherit; } .widget-hbox { /* Horizontal widgets */ - /* The following section sets the style for the invisible div that - hold widgets and their accompanying labels. - - Looks like this: - +-----------------------------+ - | widget-box (or similar) | - | +-------+---------------+ | - | | Label | Actual Widget | | - | +-------+---------------+ | - +-----------------------------+ - */ - margin: 5px; - /* Old browsers */ - -webkit-box-pack: start; - -moz-box-pack: start; - box-pack: start; - /* Modern browsers */ - justify-content: flex-start; - /* Box */ - /* Old browsers */ - /* Modern browsers */ - /* Box */ - box-sizing: border-box; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - /* Old browsers */ - -webkit-box-align: start; - -moz-box-align: start; - box-align: start; - /* Modern browsers */ - align-items: flex-start; /* Old browsers */ display: -webkit-box; -webkit-box-orient: horizontal; @@ -1605,99 +1521,27 @@ div.cell.text_cell.rendered { box-flex: 0; /* Modern browsers */ flex: none; -} -.widget-hbox-single { - /* Single line horizontal widgets */ - /* Horizontal widgets */ - /* The following section sets the style for the invisible div that - hold widgets and their accompanying labels. - - Looks like this: - +-----------------------------+ - | widget-box (or similar) | - | +-------+---------------+ | - | | Label | Actual Widget | | - | +-------+---------------+ | - +-----------------------------+ - */ margin: 5px; - /* Old browsers */ - -webkit-box-pack: start; - -moz-box-pack: start; - box-pack: start; - /* Modern browsers */ - justify-content: flex-start; - /* Box */ - /* Old browsers */ - /* Modern browsers */ - /* Box */ - box-sizing: border-box; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - /* Old browsers */ - -webkit-box-align: start; - -moz-box-align: start; - box-align: start; - /* Modern browsers */ - align-items: flex-start; - /* Old browsers */ - display: -webkit-box; - -webkit-box-orient: horizontal; - -webkit-box-align: stretch; - display: -moz-box; - -moz-box-orient: horizontal; - -moz-box-align: stretch; - display: box; - box-orient: horizontal; - box-align: stretch; - /* Modern browsers */ - display: flex; - flex-direction: row; - align-items: stretch; - /* Old browsers */ - -webkit-box-flex: 0; - -moz-box-flex: 0; - box-flex: 0; - /* Modern browsers */ - flex: none; - height: 30px; } -.widget-hbox-single input[type="checkbox"] { +.widget-hbox input[type="checkbox"] { margin-top: 9px; } +.widget-hbox .widget-label { + /* Horizontal Label */ + min-width: 10ex; + padding-right: 8px; + padding-top: 5px; + text-align: right; + vertical-align: text-top; +} +.widget-hbox .widget-readout { + padding-left: 8px; + padding-top: 5px; + text-align: left; + vertical-align: text-top; +} .widget-vbox { /* Vertical widgets */ - /* The following section sets the style for the invisible div that - hold widgets and their accompanying labels. - - Looks like this: - +-----------------------------+ - | widget-box (or similar) | - | +-------+---------------+ | - | | Label | Actual Widget | | - | +-------+---------------+ | - +-----------------------------+ - */ - margin: 5px; - /* Old browsers */ - -webkit-box-pack: start; - -moz-box-pack: start; - box-pack: start; - /* Modern browsers */ - justify-content: flex-start; - /* Box */ - /* Old browsers */ - /* Modern browsers */ - /* Box */ - box-sizing: border-box; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - /* Old browsers */ - -webkit-box-align: start; - -moz-box-align: start; - box-align: start; - /* Modern browsers */ - align-items: flex-start; /* Old browsers */ display: -webkit-box; -webkit-box-orient: vertical; @@ -1719,61 +1563,17 @@ div.cell.text_cell.rendered { /* Modern browsers */ flex: none; } -.widget-vbox-single { - /* For vertical slides */ - /* Vertical widgets */ - /* The following section sets the style for the invisible div that - hold widgets and their accompanying labels. - - Looks like this: - +-----------------------------+ - | widget-box (or similar) | - | +-------+---------------+ | - | | Label | Actual Widget | | - | +-------+---------------+ | - +-----------------------------+ - */ - margin: 5px; - /* Old browsers */ - -webkit-box-pack: start; - -moz-box-pack: start; - box-pack: start; - /* Modern browsers */ - justify-content: flex-start; - /* Box */ - /* Old browsers */ - /* Modern browsers */ - /* Box */ - box-sizing: border-box; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - /* Old browsers */ - -webkit-box-align: start; - -moz-box-align: start; - box-align: start; - /* Modern browsers */ - align-items: flex-start; - /* Old browsers */ - display: -webkit-box; - -webkit-box-orient: vertical; - -webkit-box-align: stretch; - display: -moz-box; - -moz-box-orient: vertical; - -moz-box-align: stretch; - display: box; - box-orient: vertical; - box-align: stretch; - /* Modern browsers */ - display: flex; - flex-direction: column; - align-items: stretch; - /* Old browsers */ - -webkit-box-flex: 0; - -moz-box-flex: 0; - box-flex: 0; - /* Modern browsers */ - flex: none; - width: 30px; +.widget-vbox .widget-label { + /* Vertical Label */ + padding-bottom: 5px; + text-align: center; + vertical-align: text-bottom; +} +.widget-vbox .widget-readout { + /* Vertical Label */ + padding-top: 5px; + text-align: center; + vertical-align: text-top; } .widget-modal { /* Box - ModalView */ diff --git a/IPython/html/static/style/style.min.css b/IPython/html/static/style/style.min.css index 41b21ce..73170c5 100644 --- a/IPython/html/static/style/style.min.css +++ b/IPython/html/static/style/style.min.css @@ -9049,32 +9049,6 @@ div.cell.text_cell.rendered { } /* THE CLASSES BELOW CAN APPEAR ANYWHERE IN THE DOM (POSSIBLEY OUTSIDE OF THE WIDGET AREA). */ -.widget-hlabel { - /* Horizontal Label */ - min-width: 10ex; - padding-right: 8px; - padding-top: 5px; - text-align: right; - vertical-align: text-top; -} -.widget-vlabel { - /* Vertical Label */ - padding-bottom: 5px; - text-align: center; - vertical-align: text-bottom; -} -.widget-hreadout { - padding-left: 8px; - padding-top: 5px; - text-align: left; - vertical-align: text-top; -} -.widget-vreadout { - /* Vertical Label */ - padding-top: 5px; - text-align: center; - vertical-align: text-top; -} .slide-track { /* Slider Track */ border: 1px solid #CCCCCC; @@ -9294,69 +9268,11 @@ div.cell.text_cell.rendered { /* ComboBox Main Button */ min-width: 125px; } -.widget-box { - /* The following section sets the style for the invisible div that - hold widgets and their accompanying labels. - - Looks like this: - +-----------------------------+ - | widget-box (or similar) | - | +-------+---------------+ | - | | Label | Actual Widget | | - | +-------+---------------+ | - +-----------------------------+ - */ - margin: 5px; - /* Old browsers */ - -webkit-box-pack: start; - -moz-box-pack: start; - box-pack: start; - /* Modern browsers */ - justify-content: flex-start; - /* Box */ - box-sizing: border-box; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - /* Old browsers */ - -webkit-box-align: start; - -moz-box-align: start; - box-align: start; - /* Modern browsers */ - align-items: flex-start; +.widget_item .dropdown-menu li a { + color: inherit; } .widget-hbox { /* Horizontal widgets */ - /* The following section sets the style for the invisible div that - hold widgets and their accompanying labels. - - Looks like this: - +-----------------------------+ - | widget-box (or similar) | - | +-------+---------------+ | - | | Label | Actual Widget | | - | +-------+---------------+ | - +-----------------------------+ - */ - margin: 5px; - /* Old browsers */ - -webkit-box-pack: start; - -moz-box-pack: start; - box-pack: start; - /* Modern browsers */ - justify-content: flex-start; - /* Box */ - /* Old browsers */ - /* Modern browsers */ - /* Box */ - box-sizing: border-box; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - /* Old browsers */ - -webkit-box-align: start; - -moz-box-align: start; - box-align: start; - /* Modern browsers */ - align-items: flex-start; /* Old browsers */ display: -webkit-box; -webkit-box-orient: horizontal; @@ -9377,99 +9293,27 @@ div.cell.text_cell.rendered { box-flex: 0; /* Modern browsers */ flex: none; -} -.widget-hbox-single { - /* Single line horizontal widgets */ - /* Horizontal widgets */ - /* The following section sets the style for the invisible div that - hold widgets and their accompanying labels. - - Looks like this: - +-----------------------------+ - | widget-box (or similar) | - | +-------+---------------+ | - | | Label | Actual Widget | | - | +-------+---------------+ | - +-----------------------------+ - */ margin: 5px; - /* Old browsers */ - -webkit-box-pack: start; - -moz-box-pack: start; - box-pack: start; - /* Modern browsers */ - justify-content: flex-start; - /* Box */ - /* Old browsers */ - /* Modern browsers */ - /* Box */ - box-sizing: border-box; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - /* Old browsers */ - -webkit-box-align: start; - -moz-box-align: start; - box-align: start; - /* Modern browsers */ - align-items: flex-start; - /* Old browsers */ - display: -webkit-box; - -webkit-box-orient: horizontal; - -webkit-box-align: stretch; - display: -moz-box; - -moz-box-orient: horizontal; - -moz-box-align: stretch; - display: box; - box-orient: horizontal; - box-align: stretch; - /* Modern browsers */ - display: flex; - flex-direction: row; - align-items: stretch; - /* Old browsers */ - -webkit-box-flex: 0; - -moz-box-flex: 0; - box-flex: 0; - /* Modern browsers */ - flex: none; - height: 30px; } -.widget-hbox-single input[type="checkbox"] { +.widget-hbox input[type="checkbox"] { margin-top: 9px; } +.widget-hbox .widget-label { + /* Horizontal Label */ + min-width: 10ex; + padding-right: 8px; + padding-top: 5px; + text-align: right; + vertical-align: text-top; +} +.widget-hbox .widget-readout { + padding-left: 8px; + padding-top: 5px; + text-align: left; + vertical-align: text-top; +} .widget-vbox { /* Vertical widgets */ - /* The following section sets the style for the invisible div that - hold widgets and their accompanying labels. - - Looks like this: - +-----------------------------+ - | widget-box (or similar) | - | +-------+---------------+ | - | | Label | Actual Widget | | - | +-------+---------------+ | - +-----------------------------+ - */ - margin: 5px; - /* Old browsers */ - -webkit-box-pack: start; - -moz-box-pack: start; - box-pack: start; - /* Modern browsers */ - justify-content: flex-start; - /* Box */ - /* Old browsers */ - /* Modern browsers */ - /* Box */ - box-sizing: border-box; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - /* Old browsers */ - -webkit-box-align: start; - -moz-box-align: start; - box-align: start; - /* Modern browsers */ - align-items: flex-start; /* Old browsers */ display: -webkit-box; -webkit-box-orient: vertical; @@ -9491,61 +9335,17 @@ div.cell.text_cell.rendered { /* Modern browsers */ flex: none; } -.widget-vbox-single { - /* For vertical slides */ - /* Vertical widgets */ - /* The following section sets the style for the invisible div that - hold widgets and their accompanying labels. - - Looks like this: - +-----------------------------+ - | widget-box (or similar) | - | +-------+---------------+ | - | | Label | Actual Widget | | - | +-------+---------------+ | - +-----------------------------+ - */ - margin: 5px; - /* Old browsers */ - -webkit-box-pack: start; - -moz-box-pack: start; - box-pack: start; - /* Modern browsers */ - justify-content: flex-start; - /* Box */ - /* Old browsers */ - /* Modern browsers */ - /* Box */ - box-sizing: border-box; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - /* Old browsers */ - -webkit-box-align: start; - -moz-box-align: start; - box-align: start; - /* Modern browsers */ - align-items: flex-start; - /* Old browsers */ - display: -webkit-box; - -webkit-box-orient: vertical; - -webkit-box-align: stretch; - display: -moz-box; - -moz-box-orient: vertical; - -moz-box-align: stretch; - display: box; - box-orient: vertical; - box-align: stretch; - /* Modern browsers */ - display: flex; - flex-direction: column; - align-items: stretch; - /* Old browsers */ - -webkit-box-flex: 0; - -moz-box-flex: 0; - box-flex: 0; - /* Modern browsers */ - flex: none; - width: 30px; +.widget-vbox .widget-label { + /* Vertical Label */ + padding-bottom: 5px; + text-align: center; + vertical-align: text-bottom; +} +.widget-vbox .widget-readout { + /* Vertical Label */ + padding-top: 5px; + text-align: center; + vertical-align: text-top; } .widget-modal { /* Box - ModalView */ diff --git a/IPython/html/static/widgets/js/widget.js b/IPython/html/static/widgets/js/widget.js index 4aff9d5..eac8101 100644 --- a/IPython/html/static/widgets/js/widget.js +++ b/IPython/html/static/widgets/js/widget.js @@ -258,12 +258,12 @@ define(["widgets/js/manager", return unpacked; } else if (typeof value === 'string' && value.slice(0,10) === "IPY_MODEL_") { - var model = this.widget_manager.get_model(value.slice(10, value.length)); - if (model) { - return model; - } else { - return value; - } + var model = this.widget_manager.get_model(value.slice(10, value.length)); + if (model) { + return model; + } else { + return value; + } } else { return value; } @@ -427,35 +427,89 @@ define(["widgets/js/manager", // Public constructor DOMWidgetView.__super__.initialize.apply(this, [parameters]); this.on('displayed', this.show, this); + this.model.on('change:visible', this.update_visible, this); + this.model.on('change:_css', this.update_css, this); + + this.model.on('change:_dom_classes', function(model, new_classes) { + var old_classes = model.previous('_dom_classes'); + this.update_classes(old_classes, new_classes); + }, this); + + this.model.on('change:color', function (model, value) { + this.update_attr('color', value); }, this); + + this.model.on('change:background_color', function (model, value) { + this.update_attr('background', value); }, this); + + this.model.on('change:width', function (model, value) { + this.update_attr('width', value); }, this); + + this.model.on('change:height', function (model, value) { + this.update_attr('height', value); }, this); + + this.model.on('change:border_color', function (model, value) { + this.update_attr('border-color', value); }, this); + + this.model.on('change:border_width', function (model, value) { + this.update_attr('border-width', value); }, this); + + this.model.on('change:border_style', function (model, value) { + this.update_attr('border-style', value); }, this); + + this.model.on('change:font_style', function (model, value) { + this.update_attr('font-style', value); }, this); + + this.model.on('change:font_weight', function (model, value) { + this.update_attr('font-weight', value); }, this); + + this.model.on('change:font_size', function (model, value) { + this.update_attr('font-size', this._default_px(value)); }, this); + + this.model.on('change:font_family', function (model, value) { + this.update_attr('font-family', value); }, this); + + this.model.on('change:padding', function (model, value) { + this.update_attr('padding', value); }, this); + + this.model.on('change:margin', function (model, value) { + this.update_attr('margin', this._default_px(value)); }, this); + + this.model.on('change:border_radius', function (model, value) { + this.update_attr('border-radius', this._default_px(value)); }, this); + this.after_displayed(function() { this.update_visible(this.model, this.model.get("visible")); this.update_css(this.model, this.model.get("_css")); + + this.update_classes([], this.model.get('_dom_classes')); + this.update_attr('color', this.model.get('color')); + this.update_attr('background', this.model.get('background_color')); + this.update_attr('width', this.model.get('width')); + this.update_attr('height', this.model.get('height')); + this.update_attr('border-color', this.model.get('border_color')); + this.update_attr('border-width', this.model.get('border_width')); + this.update_attr('border-style', this.model.get('border_style')); + this.update_attr('font-style', this.model.get('font_style')); + this.update_attr('font-weight', this.model.get('font_weight')); + this.update_attr('font-size', this.model.get('font_size')); + this.update_attr('font-family', this.model.get('font_family')); + this.update_attr('padding', this.model.get('padding')); + this.update_attr('margin', this.model.get('margin')); + this.update_attr('border-radius', this.model.get('border_radius')); }, this); - this.model.on('msg:custom', this.on_msg, this); - this.model.on('change:visible', this.update_visible, this); - this.model.on('change:_css', this.update_css, this); }, - on_msg: function(msg) { - // Handle DOM specific msgs. - switch(msg.msg_type) { - case 'add_class': - this.add_class(msg.selector, msg.class_list); - break; - case 'remove_class': - this.remove_class(msg.selector, msg.class_list); - break; + _default_px: function(value) { + // Makes browser interpret a numerical string as a pixel value. + if (/^\d+\.?(\d+)?$/.test(value.trim())) { + return value.trim() + 'px'; } + return value; }, - add_class: function (selector, class_list) { - // Add a DOM class to an element. - this._get_selector_element(selector).addClass(class_list); - }, - - remove_class: function (selector, class_list) { - // Remove a DOM class from an element. - this._get_selector_element(selector).removeClass(class_list); + update_attr: function(name, value) { + // Set a css attr of the widget view. + this.$el.css(name, value); }, update_visible: function(model, value) { @@ -479,6 +533,54 @@ define(["widgets/js/manager", } }, + update_classes: function (old_classes, new_classes, $el) { + // Update the DOM classes applied to an element, default to this.$el. + if ($el===undefined) { + $el = this.$el; + } + this.do_diff(old_classes, new_classes, function(removed) { + $el.removeClass(removed); + }, function(added) { + $el.addClass(added); + }); + }, + + update_mapped_classes: function(class_map, trait_name, previous_trait_value, $el) { + // Update the DOM classes applied to the widget based on a single + // trait's value. + // + // Given a trait value classes map, this function automatically + // handles applying the appropriate classes to the widget element + // and removing classes that are no longer valid. + // + // Parameters + // ---------- + // class_map: dictionary + // Dictionary of trait values to class lists. + // Example: + // { + // success: ['alert', 'alert-success'], + // info: ['alert', 'alert-info'], + // warning: ['alert', 'alert-warning'], + // danger: ['alert', 'alert-danger'] + // }; + // trait_name: string + // Name of the trait to check the value of. + // previous_trait_value: optional string, default '' + // Last trait value + // $el: optional jQuery element handle, defaults to this.$el + // Element that the classes are applied to. + var key = previous_trait_value; + if (key === undefined) { + key = this.model.previous(trait_name); + } + var old_classes = class_map[key] ? class_map[key] : []; + key = this.model.get(trait_name); + var new_classes = class_map[key] ? class_map[key] : []; + + this.update_classes(old_classes, new_classes, $el || this.$el); + }, + _get_selector_element: function (selector) { // Get the elements via the css selector. var elements; diff --git a/IPython/html/static/widgets/js/widget_bool.js b/IPython/html/static/widgets/js/widget_bool.js index 83af9d4..e9cbb2d 100644 --- a/IPython/html/static/widgets/js/widget_bool.js +++ b/IPython/html/static/widgets/js/widget_bool.js @@ -11,9 +11,9 @@ define([ render : function(){ // Called when view is rendered. this.$el - .addClass('widget-hbox-single'); + .addClass('widget-hbox'); this.$label = $('
') - .addClass('widget-hlabel') + .addClass('widget-label') .appendTo(this.$el) .hide(); this.$checkbox = $('') @@ -24,6 +24,11 @@ define([ this.update(); // Set defaults. }, + update_attr: function(name, value) { + // Set a css attr of the widget view. + this.$checkbox.css(name, value); + }, + handle_click: function() { // Handles when the checkbox is clicked. @@ -72,8 +77,24 @@ define([ that.handle_click(); })); + this.model.on('change:button_style', function(model, value) { + this.update_button_style(); + }, this); + this.update_button_style(''); + this.update(); // Set defaults. }, + + update_button_style: function(previous_trait_value) { + var class_map = { + primary: ['btn-primary'], + success: ['btn-success'], + info: ['btn-info'], + warning: ['btn-warning'], + danger: ['btn-danger'] + }; + this.update_mapped_classes(class_map, 'button_style', previous_trait_value); + }, update : function(options){ // Update the contents of this view diff --git a/IPython/html/static/widgets/js/widget_box.js b/IPython/html/static/widgets/js/widget_box.js index a1e97fe..be54fab 100644 --- a/IPython/html/static/widgets/js/widget_box.js +++ b/IPython/html/static/widgets/js/widget_box.js @@ -14,6 +14,20 @@ define([ this.model.on('change:children', function(model, value) { this.update_children(model.previous('children'), value); }, this); + this.model.on('change:overflow_x', function(model, value) { + this.update_overflow_x(); + }, this); + this.model.on('change:overflow_y', function(model, value) { + this.update_overflow_y(); + }, this); + this.model.on('change:box_style', function(model, value) { + this.update_box_style(); + }, this); + }, + + update_attr: function(name, value) { + // Set a css attr of the widget view. + this.$box.css(name, value); }, render: function(){ @@ -21,6 +35,29 @@ define([ this.$box = this.$el; this.$box.addClass('widget-box'); this.update_children([], this.model.get('children')); + this.update_overflow_x(); + this.update_overflow_y(); + this.update_box_style(''); + }, + + update_overflow_x: function() { + // Called when the x-axis overflow setting is changed. + this.$box.css('overflow-x', this.model.get('overflow_x')); + }, + + update_overflow_y: function() { + // Called when the y-axis overflow setting is changed. + this.$box.css('overflow-y', this.model.get('overflow_y')); + }, + + update_box_style: function(previous_trait_value) { + var class_map = { + success: ['alert', 'alert-success'], + info: ['alert', 'alert-info'], + warning: ['alert', 'alert-warning'], + danger: ['alert', 'alert-danger'] + }; + this.update_mapped_classes(class_map, 'box_style', previous_trait_value, this.$box); }, update_children: function(old_list, new_list) { @@ -142,8 +179,8 @@ define([ that.popped_out = !that.popped_out; if (!that.popped_out) { that.$minimize - .removeClass('fa fa-arrow-down') - .addClass('fa fa-arrow-up'); + .removeClass('fa-arrow-down') + .addClass('fa-arrow-up'); that.$window .draggable('destroy') @@ -156,8 +193,8 @@ define([ that.$close.hide(); } else { that.$minimize - .addClass('fa fa-arrow-down') - .removeClass('fa fa-arrow-up'); + .addClass('fa-arrow-down') + .removeClass('fa-arrow-up'); that.$window .removeClass('docked-widget-modal') diff --git a/IPython/html/static/widgets/js/widget_button.js b/IPython/html/static/widgets/js/widget_button.js index 3ff7c23..ddae4d8 100644 --- a/IPython/html/static/widgets/js/widget_button.js +++ b/IPython/html/static/widgets/js/widget_button.js @@ -13,6 +13,11 @@ define([ this.setElement($("