Show More
@@ -56,7 +56,7 define(["notebook/js/widgets/widget"], function(WidgetManager){ | |||||
56 | this.$checkbox.prop('disabled', disabled); |
|
56 | this.$checkbox.prop('disabled', disabled); | |
57 |
|
57 | |||
58 | var description = this.model.get('description'); |
|
58 | var description = this.model.get('description'); | |
59 | if (description.length === 0) { |
|
59 | if (description.trim().length === 0) { | |
60 | this.$label.hide(); |
|
60 | this.$label.hide(); | |
61 | } else { |
|
61 | } else { | |
62 | this.$label.text(description); |
|
62 | this.$label.text(description); | |
@@ -102,7 +102,7 define(["notebook/js/widgets/widget"], function(WidgetManager){ | |||||
102 | this.$el.prop('disabled', disabled); |
|
102 | this.$el.prop('disabled', disabled); | |
103 |
|
103 | |||
104 | var description = this.model.get('description'); |
|
104 | var description = this.model.get('description'); | |
105 | if (description.length === 0) { |
|
105 | if (description.trim().length === 0) { | |
106 | this.$el.html(" "); // Preserve button height |
|
106 | this.$el.html(" "); // Preserve button height | |
107 | } else { |
|
107 | } else { | |
108 | this.$el.text(description); |
|
108 | this.$el.text(description); |
@@ -236,14 +236,14 define(["notebook/js/widgets/widget"], function(WidgetManager) { | |||||
236 | // Called when the model is changed. The model may have been |
|
236 | // Called when the model is changed. The model may have been | |
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.trim().length === 0) { | |
240 | this.$title.html(" "); // Preserve title height |
|
240 | this.$title.html(" "); // 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.trim().length === 0) { | |
247 | this.$show_button.html(" "); // Preserve button height |
|
247 | this.$show_button.html(" "); // Preserve button height | |
248 | } else { |
|
248 | } else { | |
249 | this.$show_button.text(button_text); |
|
249 | this.$show_button.text(button_text); |
General Comments 0
You need to be logged in to leave comments.
Login now