Show More
@@ -23,8 +23,7 b' define(["notebook/js/widgets/widget"], function(widget_manager){' | |||
|
23 | 23 | // Called when view is rendered. |
|
24 | 24 | render : function(){ |
|
25 | 25 | this.$el |
|
26 | .addClass('widget-hbox-single') | |
|
27 | .html(''); | |
|
26 | .addClass('widget-hbox-single'); | |
|
28 | 27 | this.$label = $('<div />') |
|
29 | 28 | .appendTo(this.$el) |
|
30 | 29 | .addClass('widget-hlabel') |
@@ -51,10 +50,11 b' define(["notebook/js/widgets/widget"], function(widget_manager){' | |||
|
51 | 50 | // changed by another view or by a state update from the back-end. |
|
52 | 51 | |
|
53 | 52 | if (options === undefined || options.updated_view != this) { |
|
54 | // Slider related keys. | |
|
55 | var _keys = ['step', 'max', 'min', 'disabled']; | |
|
56 | for (var index in _keys) { | |
|
57 | var key = _keys[index]; | |
|
53 | // JQuery slider option keys. These keys happen to have a | |
|
54 | // one-to-one mapping with the corrosponding keys of the model. | |
|
55 | var jquery_slider_keys = ['step', 'max', 'min', 'disabled']; | |
|
56 | for (var index in jquery_slider_keys) { | |
|
57 | var key = jquery_slider_keys[index]; | |
|
58 | 58 | if (this.model.get(key) !== undefined) { |
|
59 | 59 | this.$slider.slider("option", key, this.model.get(key)); |
|
60 | 60 | } |
@@ -129,8 +129,7 b' define(["notebook/js/widgets/widget"], function(widget_manager){' | |||
|
129 | 129 | // Called when view is rendered. |
|
130 | 130 | render : function(){ |
|
131 | 131 | this.$el |
|
132 | .addClass('widget-hbox-single') | |
|
133 | .html(''); | |
|
132 | .addClass('widget-hbox-single'); | |
|
134 | 133 | this.$label = $('<div />') |
|
135 | 134 | .appendTo(this.$el) |
|
136 | 135 | .addClass('widget-hlabel') |
@@ -226,8 +225,7 b' define(["notebook/js/widgets/widget"], function(widget_manager){' | |||
|
226 | 225 | // Called when view is rendered. |
|
227 | 226 | render : function(){ |
|
228 | 227 | this.$el |
|
229 | .addClass('widget-hbox-single') | |
|
230 | .html(''); | |
|
228 | .addClass('widget-hbox-single'); | |
|
231 | 229 | this.$label = $('<div />') |
|
232 | 230 | .appendTo(this.$el) |
|
233 | 231 | .addClass('widget-hlabel') |
@@ -23,8 +23,7 b' define(["notebook/js/widgets/widget"], function(widget_manager){' | |||
|
23 | 23 | // Called when view is rendered. |
|
24 | 24 | render : function(){ |
|
25 | 25 | this.$el |
|
26 | .addClass('widget-hbox-single') | |
|
27 | .html(''); | |
|
26 | .addClass('widget-hbox-single'); | |
|
28 | 27 | this.$label = $('<div />') |
|
29 | 28 | .appendTo(this.$el) |
|
30 | 29 | .addClass('widget-hlabel') |
@@ -50,10 +49,11 b' define(["notebook/js/widgets/widget"], function(widget_manager){' | |||
|
50 | 49 | // Called when the model is changed. The model may have been |
|
51 | 50 | // changed by another view or by a state update from the back-end. |
|
52 | 51 | if (options === undefined || options.updated_view != this) { |
|
53 | // Slider related keys. | |
|
54 | var _keys = ['step', 'max', 'min', 'disabled']; | |
|
55 | for (var index in _keys) { | |
|
56 | var key = _keys[index]; | |
|
52 | // JQuery slider option keys. These keys happen to have a | |
|
53 | // one-to-one mapping with the corrosponding keys of the model. | |
|
54 | var jquery_slider_keys = ['step', 'max', 'min', 'disabled']; | |
|
55 | for (var index in jquery_slider_keys) { | |
|
56 | var key = jquery_slider_keys[index]; | |
|
57 | 57 | if (this.model.get(key) !== undefined) { |
|
58 | 58 | this.$slider.slider("option", key, this.model.get(key)); |
|
59 | 59 | } |
@@ -127,8 +127,7 b' define(["notebook/js/widgets/widget"], function(widget_manager){' | |||
|
127 | 127 | // Called when view is rendered. |
|
128 | 128 | render : function(){ |
|
129 | 129 | this.$el |
|
130 | .addClass('widget-hbox-single') | |
|
131 | .html(''); | |
|
130 | .addClass('widget-hbox-single'); | |
|
132 | 131 | this.$label = $('<div />') |
|
133 | 132 | .appendTo(this.$el) |
|
134 | 133 | .addClass('widget-hlabel') |
General Comments 0
You need to be logged in to leave comments.
Login now