From c50096334c0807469f0d5162404ee18150d01b1d Mon Sep 17 00:00:00 2001 From: MinRK Date: Wed, 12 Feb 2014 18:20:51 -0800 Subject: [PATCH 1/4] use non-breaking space for button with no description to preserve button's size reverses some inappropriate replacements of .html with .text. closes #5113 --- IPython/html/static/notebook/js/widgets/widget_bool.js | 2 +- IPython/html/static/notebook/js/widgets/widget_button.js | 2 +- .../html/static/notebook/js/widgets/widget_container.js | 8 ++++---- .../html/static/notebook/js/widgets/widget_selection.js | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/IPython/html/static/notebook/js/widgets/widget_bool.js b/IPython/html/static/notebook/js/widgets/widget_bool.js index 22be10651..8b966d131 100644 --- a/IPython/html/static/notebook/js/widgets/widget_bool.js +++ b/IPython/html/static/notebook/js/widgets/widget_bool.js @@ -103,7 +103,7 @@ define(["notebook/js/widgets/widget"], function(WidgetManager){ var description = this.model.get('description'); if (description.length === 0) { - this.$el.text(' '); // Preserve button height + this.$el.html(" "); // Preserve button height } else { this.$el.text(description); } diff --git a/IPython/html/static/notebook/js/widgets/widget_button.js b/IPython/html/static/notebook/js/widgets/widget_button.js index a0b747ebd..eb3c317a8 100644 --- a/IPython/html/static/notebook/js/widgets/widget_button.js +++ b/IPython/html/static/notebook/js/widgets/widget_button.js @@ -32,7 +32,7 @@ define(["notebook/js/widgets/widget"], function(WidgetManager){ // changed by another view or by a state update from the back-end. var description = this.model.get('description'); if (description.length === 0) { - this.$el.text(' '); // Preserve button height + this.$el.html(" "); // Preserve button height } else { this.$el.text(description); } diff --git a/IPython/html/static/notebook/js/widgets/widget_container.js b/IPython/html/static/notebook/js/widgets/widget_container.js index eb538c2db..76838f90f 100644 --- a/IPython/html/static/notebook/js/widgets/widget_container.js +++ b/IPython/html/static/notebook/js/widgets/widget_container.js @@ -137,7 +137,7 @@ define(["notebook/js/widgets/widget"], function(WidgetManager) { }); this.$title = $('
') .addClass('widget-modal-title') - .text(' ') + .html(" ") .appendTo(this.$title_bar); this.$body = $('
') .addClass('modal-body') @@ -147,7 +147,7 @@ define(["notebook/js/widgets/widget"], function(WidgetManager) { .appendTo(this.$window); this.$show_button = $('