##// END OF EJS Templates
Set default element to be styled in built-in views
Jonathan Frederic -
Show More
@@ -25,6 +25,7 b' require(["notebook/js/widget"], function(){'
25 })
25 })
26 .appendTo(this.$el);
26 .appendTo(this.$el);
27
27
28 this.$el_to_style = this.$checkbox; // Set default element to style
28 this.update(); // Set defaults.
29 this.update(); // Set defaults.
29 },
30 },
30
31
@@ -64,6 +65,7 b' require(["notebook/js/widget"], function(){'
64 .attr('type', 'button')
65 .attr('type', 'button')
65 .attr('data-toggle', 'button')
66 .attr('data-toggle', 'button')
66 .appendTo(this.$el);
67 .appendTo(this.$el);
68 this.$el_to_style = this.$button; // Set default element to style
67
69
68 this.update(); // Set defaults.
70 this.update(); // Set defaults.
69 },
71 },
@@ -21,6 +21,7 b' require(["notebook/js/widget"], function(){'
21 this.$slider_container = $('<div />')
21 this.$slider_container = $('<div />')
22 .addClass('widget-hslider')
22 .addClass('widget-hslider')
23 .append(this.$slider);
23 .append(this.$slider);
24 this.$el_to_style = this.$slider_container; // Set default element to style
24 this.$el.append(this.$slider_container);
25 this.$el.append(this.$slider_container);
25
26
26 // Set defaults.
27 // Set defaults.
@@ -114,6 +115,7 b' require(["notebook/js/widget"], function(){'
114 .addClass('input')
115 .addClass('input')
115 .addClass('widget-numeric-text')
116 .addClass('widget-numeric-text')
116 .appendTo(this.$el);
117 .appendTo(this.$el);
118 this.$el_to_style = this.$textbox; // Set default element to style
117 this.update(); // Set defaults.
119 this.update(); // Set defaults.
118 },
120 },
119
121
@@ -204,6 +206,7 b' require(["notebook/js/widget"], function(){'
204 .addClass('progress')
206 .addClass('progress')
205 .addClass('widget-progress')
207 .addClass('widget-progress')
206 .appendTo(this.$el);
208 .appendTo(this.$el);
209 this.$el_to_style = this.$progress; // Set default element to style
207 this.$bar = $('<div />')
210 this.$bar = $('<div />')
208 .addClass('bar')
211 .addClass('bar')
209 .css('width', '50%')
212 .css('width', '50%')
@@ -21,6 +21,7 b' require(["notebook/js/widget"], function(){'
21 this.$slider_container = $('<div />')
21 this.$slider_container = $('<div />')
22 .addClass('widget-hslider')
22 .addClass('widget-hslider')
23 .append(this.$slider);
23 .append(this.$slider);
24 this.$el_to_style = this.$slider_container; // Set default element to style
24 this.$el.append(this.$slider_container);
25 this.$el.append(this.$slider_container);
25
26
26 // Set defaults.
27 // Set defaults.
@@ -113,6 +114,7 b' require(["notebook/js/widget"], function(){'
113 .addClass('input')
114 .addClass('input')
114 .addClass('widget-numeric-text')
115 .addClass('widget-numeric-text')
115 .appendTo(this.$el);
116 .appendTo(this.$el);
117 this.$el_to_style = this.$textbox; // Set default element to style
116 this.update(); // Set defaults.
118 this.update(); // Set defaults.
117 },
119 },
118
120
@@ -18,6 +18,7 b' require(["notebook/js/widget"], function(){'
18 .addClass('widget_item')
18 .addClass('widget_item')
19 .addClass('btn-group')
19 .addClass('btn-group')
20 .appendTo(this.$el);
20 .appendTo(this.$el);
21 this.$el_to_style = this.$buttongroup; // Set default element to style
21 this.$droplabel = $('<button />')
22 this.$droplabel = $('<button />')
22 .addClass('btn')
23 .addClass('btn')
23 .addClass('widget-combo-btn')
24 .addClass('widget-combo-btn')
@@ -96,6 +97,7 b' require(["notebook/js/widget"], function(){'
96 .appendTo(this.$el)
97 .appendTo(this.$el)
97 .addClass('widget-container')
98 .addClass('widget-container')
98 .addClass('vbox');
99 .addClass('vbox');
100 this.$el_to_style = this.$container; // Set default element to style
99 this.update();
101 this.update();
100 },
102 },
101
103
@@ -181,6 +183,7 b' require(["notebook/js/widget"], function(){'
181 .addClass('btn-group')
183 .addClass('btn-group')
182 .attr('data-toggle', 'buttons-radio')
184 .attr('data-toggle', 'buttons-radio')
183 .appendTo(this.$el);
185 .appendTo(this.$el);
186 this.$el_to_style = this.$buttongroup; // Set default element to style
184 this.update();
187 this.update();
185 },
188 },
186
189
@@ -36,6 +36,7 b' require(["notebook/js/widget"], function(){'
36 .attr('rows', 5)
36 .attr('rows', 5)
37 .addClass('widget-text')
37 .addClass('widget-text')
38 .appendTo(this.$el);
38 .appendTo(this.$el);
39 this.$el_to_style = this.$textbox; // Set default element to style
39 this.update(); // Set defaults.
40 this.update(); // Set defaults.
40 },
41 },
41
42
@@ -89,6 +90,7 b' require(["notebook/js/widget"], function(){'
89 .addClass('input')
90 .addClass('input')
90 .addClass('widget-text')
91 .addClass('widget-text')
91 .appendTo(this.$el);
92 .appendTo(this.$el);
93 this.$el_to_style = this.$textbox; // Set default element to style
92 this.update(); // Set defaults.
94 this.update(); // Set defaults.
93 },
95 },
94
96
General Comments 0
You need to be logged in to leave comments. Login now