##// END OF EJS Templates
use non-breaking space for button with no description...
MinRK -
Show More
@@ -103,7 +103,7 b' define(["notebook/js/widgets/widget"], function(WidgetManager){'
103
103
104 var description = this.model.get('description');
104 var description = this.model.get('description');
105 if (description.length === 0) {
105 if (description.length === 0) {
106 this.$el.text(' '); // Preserve button height
106 this.$el.html(" "); // Preserve button height
107 } else {
107 } else {
108 this.$el.text(description);
108 this.$el.text(description);
109 }
109 }
@@ -32,7 +32,7 b' define(["notebook/js/widgets/widget"], function(WidgetManager){'
32 // changed by another view or by a state update from the back-end.
32 // changed by another view or by a state update from the back-end.
33 var description = this.model.get('description');
33 var description = this.model.get('description');
34 if (description.length === 0) {
34 if (description.length === 0) {
35 this.$el.text(' '); // Preserve button height
35 this.$el.html(" "); // Preserve button height
36 } else {
36 } else {
37 this.$el.text(description);
37 this.$el.text(description);
38 }
38 }
@@ -137,7 +137,7 b' define(["notebook/js/widgets/widget"], function(WidgetManager) {'
137 });
137 });
138 this.$title = $('<div />')
138 this.$title = $('<div />')
139 .addClass('widget-modal-title')
139 .addClass('widget-modal-title')
140 .text(' ')
140 .html("&nbsp;")
141 .appendTo(this.$title_bar);
141 .appendTo(this.$title_bar);
142 this.$body = $('<div />')
142 this.$body = $('<div />')
143 .addClass('modal-body')
143 .addClass('modal-body')
@@ -147,7 +147,7 b' define(["notebook/js/widgets/widget"], function(WidgetManager) {'
147 .appendTo(this.$window);
147 .appendTo(this.$window);
148
148
149 this.$show_button = $('<button />')
149 this.$show_button = $('<button />')
150 .text(' ')
150 .html("&nbsp;")
151 .addClass('btn btn-info widget-modal-show')
151 .addClass('btn btn-info widget-modal-show')
152 .appendTo(this.$el)
152 .appendTo(this.$el)
153 .click(function(){
153 .click(function(){
@@ -237,14 +237,14 b' define(["notebook/js/widgets/widget"], function(WidgetManager) {'
237 // changed by another view or by a state update from the back-end.
237 // changed by another view or by a state update from the back-end.
238 var description = this.model.get('description');
238 var description = this.model.get('description');
239 if (description.length === 0) {
239 if (description.length === 0) {
240 this.$title.text(' '); // Preserve title height
240 this.$title.html("&nbsp;"); // Preserve title height
241 } else {
241 } else {
242 this.$title.text(description);
242 this.$title.text(description);
243 }
243 }
244
244
245 var button_text = this.model.get('button_text');
245 var button_text = this.model.get('button_text');
246 if (button_text.length === 0) {
246 if (button_text.length === 0) {
247 this.$show_button.text(' '); // Preserve button height
247 this.$show_button.html("&nbsp;"); // Preserve button height
248 } else {
248 } else {
249 this.$show_button.text(button_text);
249 this.$show_button.text(button_text);
250 }
250 }
@@ -33,7 +33,7 b' define(["notebook/js/widgets/widget"], function(WidgetManager){'
33 this.$droplabel = $('<button />')
33 this.$droplabel = $('<button />')
34 .addClass('btn')
34 .addClass('btn')
35 .addClass('widget-combo-btn')
35 .addClass('widget-combo-btn')
36 .text(' ')
36 .html("&nbsp;")
37 .appendTo(this.$buttongroup);
37 .appendTo(this.$buttongroup);
38 this.$dropbutton = $('<button />')
38 this.$dropbutton = $('<button />')
39 .addClass('btn')
39 .addClass('btn')
@@ -59,7 +59,7 b' define(["notebook/js/widgets/widget"], function(WidgetManager){'
59 if (options === undefined || options.updated_view != this) {
59 if (options === undefined || options.updated_view != this) {
60 var selected_item_text = this.model.get('value_name');
60 var selected_item_text = this.model.get('value_name');
61 if (selected_item_text.length === 0) {
61 if (selected_item_text.length === 0) {
62 this.$droplabel.text(' ');
62 this.$droplabel.html("&nbsp;");
63 } else {
63 } else {
64 this.$droplabel.text(selected_item_text);
64 this.$droplabel.text(selected_item_text);
65 }
65 }
General Comments 0
You need to be logged in to leave comments. Login now