Show More
@@ -23,7 +23,7 b'' | |||||
23 | // elsewhere. |
|
23 | // elsewhere. | |
24 | define(["underscore", |
|
24 | define(["underscore", | |
25 | "backbone", |
|
25 | "backbone", | |
26 |
], function ( |
|
26 | ], function (Underscore, Backbone) { | |
27 |
|
27 | |||
28 | Backbone.sync = function (method, model, options) { |
|
28 | Backbone.sync = function (method, model, options) { | |
29 | // Sync widget models to back-end. |
|
29 | // Sync widget models to back-end. |
@@ -17,7 +17,7 b'' | |||||
17 | define(["notebook/js/widgetmanager", |
|
17 | define(["notebook/js/widgetmanager", | |
18 | "underscore", |
|
18 | "underscore", | |
19 | "backbone"], |
|
19 | "backbone"], | |
20 |
function( |
|
20 | function(WidgetManager, Underscore, Backbone){ | |
21 |
|
21 | |||
22 | var WidgetModel = Backbone.Model.extend({ |
|
22 | var WidgetModel = Backbone.Model.extend({ | |
23 | constructor: function (widget_manager, model_id, comm) { |
|
23 | constructor: function (widget_manager, model_id, comm) { | |
@@ -211,7 +211,7 b' function(widget_manager, underscore, backbone){' | |||||
211 | }, |
|
211 | }, | |
212 |
|
212 | |||
213 | }); |
|
213 | }); | |
214 |
|
|
214 | WidgetManager.register_widget_model('WidgetModel', WidgetModel); | |
215 |
|
215 | |||
216 |
|
216 | |||
217 | var WidgetView = Backbone.View.extend({ |
|
217 | var WidgetView = Backbone.View.extend({ | |
@@ -387,6 +387,6 b' function(widget_manager, underscore, backbone){' | |||||
387 | IPython.WidgetView = WidgetView; |
|
387 | IPython.WidgetView = WidgetView; | |
388 | IPython.DOMWidgetView = DOMWidgetView; |
|
388 | IPython.DOMWidgetView = DOMWidgetView; | |
389 |
|
389 | |||
390 |
// Pass through |
|
390 | // Pass through WidgetManager namespace. | |
391 |
return |
|
391 | return WidgetManager; | |
392 | }); |
|
392 | }); |
@@ -14,7 +14,7 b'' | |||||
14 | * @namespace IPython |
|
14 | * @namespace IPython | |
15 | **/ |
|
15 | **/ | |
16 |
|
16 | |||
17 |
define(["notebook/js/widgets/widget"], function( |
|
17 | define(["notebook/js/widgets/widget"], function(WidgetManager){ | |
18 |
|
18 | |||
19 | var CheckBoxView = IPython.DOMWidgetView.extend({ |
|
19 | var CheckBoxView = IPython.DOMWidgetView.extend({ | |
20 | render : function(){ |
|
20 | render : function(){ | |
@@ -67,7 +67,7 b' define(["notebook/js/widgets/widget"], function(widget_manager){' | |||||
67 | }, |
|
67 | }, | |
68 |
|
68 | |||
69 | }); |
|
69 | }); | |
70 |
|
|
70 | WidgetManager.register_widget_view('CheckBoxView', CheckBoxView); | |
71 |
|
71 | |||
72 |
|
72 | |||
73 | var ToggleButtonView = IPython.DOMWidgetView.extend({ |
|
73 | var ToggleButtonView = IPython.DOMWidgetView.extend({ | |
@@ -121,5 +121,5 b' define(["notebook/js/widgets/widget"], function(widget_manager){' | |||||
121 | this.touch(); |
|
121 | this.touch(); | |
122 | }, |
|
122 | }, | |
123 | }); |
|
123 | }); | |
124 |
|
|
124 | WidgetManager.register_widget_view('ToggleButtonView', ToggleButtonView); | |
125 | }); |
|
125 | }); |
@@ -14,7 +14,7 b'' | |||||
14 | * @namespace IPython |
|
14 | * @namespace IPython | |
15 | **/ |
|
15 | **/ | |
16 |
|
16 | |||
17 |
define(["notebook/js/widgets/widget"], function( |
|
17 | define(["notebook/js/widgets/widget"], function(WidgetManager){ | |
18 |
|
18 | |||
19 | var ButtonView = IPython.DOMWidgetView.extend({ |
|
19 | var ButtonView = IPython.DOMWidgetView.extend({ | |
20 | render : function(){ |
|
20 | render : function(){ | |
@@ -58,5 +58,5 b' define(["notebook/js/widgets/widget"], function(widget_manager){' | |||||
58 | this.send({event: 'click'}); |
|
58 | this.send({event: 'click'}); | |
59 | }, |
|
59 | }, | |
60 | }); |
|
60 | }); | |
61 |
|
|
61 | WidgetManager.register_widget_view('ButtonView', ButtonView); | |
62 | }); |
|
62 | }); |
@@ -14,7 +14,7 b'' | |||||
14 | * @namespace IPython |
|
14 | * @namespace IPython | |
15 | **/ |
|
15 | **/ | |
16 |
|
16 | |||
17 |
define(["notebook/js/widgets/widget"], function( |
|
17 | define(["notebook/js/widgets/widget"], function(WidgetManager) { | |
18 |
|
18 | |||
19 | var ContainerView = IPython.DOMWidgetView.extend({ |
|
19 | var ContainerView = IPython.DOMWidgetView.extend({ | |
20 | render: function(){ |
|
20 | render: function(){ | |
@@ -57,7 +57,7 b' define(["notebook/js/widgets/widget"], function(widget_manager) {' | |||||
57 | return ContainerView.__super__.update.apply(this); |
|
57 | return ContainerView.__super__.update.apply(this); | |
58 | }, |
|
58 | }, | |
59 | }); |
|
59 | }); | |
60 |
|
|
60 | WidgetManager.register_widget_view('ContainerView', ContainerView); | |
61 |
|
61 | |||
62 |
|
62 | |||
63 | var ModalView = IPython.DOMWidgetView.extend({ |
|
63 | var ModalView = IPython.DOMWidgetView.extend({ | |
@@ -273,5 +273,5 b' define(["notebook/js/widgets/widget"], function(widget_manager) {' | |||||
273 | } |
|
273 | } | |
274 | }, |
|
274 | }, | |
275 | }); |
|
275 | }); | |
276 |
|
|
276 | WidgetManager.register_widget_view('ModalView', ModalView); | |
277 | }); |
|
277 | }); |
@@ -5,16 +5,6 b'' | |||||
5 | // the file COPYING, distributed as part of this software. |
|
5 | // the file COPYING, distributed as part of this software. | |
6 | //---------------------------------------------------------------------------- |
|
6 | //---------------------------------------------------------------------------- | |
7 |
|
7 | |||
8 | //============================================================================ |
|
8 | // This file is a place holder to maintain a one to one mapping of widget_*.py | |
9 | // FloatWidget |
|
9 | // files and widget_*.js widget and test files. The Views for this model are | |
10 | //============================================================================ |
|
10 | // shared with the bounded float, and can be found in widget_float_range.js. | |
11 |
|
||||
12 | /** |
|
|||
13 | * @module IPython |
|
|||
14 | * @namespace IPython |
|
|||
15 | **/ |
|
|||
16 |
|
||||
17 | define(["notebook/js/widgets/widget"], function(widget_manager){ |
|
|||
18 | // The Views for this model are shared with the bounded float, and can be |
|
|||
19 | // found in widget_float_range.js. |
|
|||
20 | }); No newline at end of file |
|
@@ -14,7 +14,7 b'' | |||||
14 | * @namespace IPython |
|
14 | * @namespace IPython | |
15 | **/ |
|
15 | **/ | |
16 |
|
16 | |||
17 |
define(["notebook/js/widgets/widget"], function( |
|
17 | define(["notebook/js/widgets/widget"], function(WidgetManager){ | |
18 |
|
18 | |||
19 | var FloatSliderView = IPython.DOMWidgetView.extend({ |
|
19 | var FloatSliderView = IPython.DOMWidgetView.extend({ | |
20 | render : function(){ |
|
20 | render : function(){ | |
@@ -121,7 +121,7 b' define(["notebook/js/widgets/widget"], function(widget_manager){' | |||||
121 | this.touch(); |
|
121 | this.touch(); | |
122 | }, |
|
122 | }, | |
123 | }); |
|
123 | }); | |
124 |
|
|
124 | WidgetManager.register_widget_view('FloatSliderView', FloatSliderView); | |
125 |
|
125 | |||
126 |
|
126 | |||
127 | var FloatTextView = IPython.DOMWidgetView.extend({ |
|
127 | var FloatTextView = IPython.DOMWidgetView.extend({ | |
@@ -218,7 +218,7 b' define(["notebook/js/widgets/widget"], function(widget_manager){' | |||||
218 | } |
|
218 | } | |
219 | } |
|
219 | } | |
220 | }); |
|
220 | }); | |
221 |
|
|
221 | WidgetManager.register_widget_view('FloatTextView', FloatTextView); | |
222 |
|
222 | |||
223 |
|
223 | |||
224 | var ProgressView = IPython.DOMWidgetView.extend({ |
|
224 | var ProgressView = IPython.DOMWidgetView.extend({ | |
@@ -263,5 +263,5 b' define(["notebook/js/widgets/widget"], function(widget_manager){' | |||||
263 | return ProgressView.__super__.update.apply(this); |
|
263 | return ProgressView.__super__.update.apply(this); | |
264 | }, |
|
264 | }, | |
265 | }); |
|
265 | }); | |
266 |
|
|
266 | WidgetManager.register_widget_view('ProgressView', ProgressView); | |
267 | }); |
|
267 | }); |
@@ -14,7 +14,7 b'' | |||||
14 | * @namespace IPython |
|
14 | * @namespace IPython | |
15 | **/ |
|
15 | **/ | |
16 |
|
16 | |||
17 |
define(["notebook/js/widgets/widget"], function( |
|
17 | define(["notebook/js/widgets/widget"], function(WidgetManager){ | |
18 |
|
18 | |||
19 | var ImageView = IPython.DOMWidgetView.extend({ |
|
19 | var ImageView = IPython.DOMWidgetView.extend({ | |
20 | render : function(){ |
|
20 | render : function(){ | |
@@ -47,5 +47,5 b' define(["notebook/js/widgets/widget"], function(widget_manager){' | |||||
47 | return ImageView.__super__.update.apply(this); |
|
47 | return ImageView.__super__.update.apply(this); | |
48 | }, |
|
48 | }, | |
49 | }); |
|
49 | }); | |
50 |
|
|
50 | WidgetManager.register_widget_view('ImageView', ImageView); | |
51 | }); |
|
51 | }); |
@@ -5,16 +5,6 b'' | |||||
5 | // the file COPYING, distributed as part of this software. |
|
5 | // the file COPYING, distributed as part of this software. | |
6 | //---------------------------------------------------------------------------- |
|
6 | //---------------------------------------------------------------------------- | |
7 |
|
7 | |||
8 | //============================================================================ |
|
8 | // This file is a place holder to maintain a one to one mapping of widget_*.py | |
9 | // IntWidget |
|
9 | // files and widget_*.js widget and test files. The Views for this model are | |
10 | //============================================================================ |
|
10 | // shared with the bounded int, and can be found in widget_int_range.js. | |
11 |
|
||||
12 | /** |
|
|||
13 | * @module IPython |
|
|||
14 | * @namespace IPython |
|
|||
15 | **/ |
|
|||
16 |
|
||||
17 | define(["notebook/js/widgets/widget"], function(widget_manager){ |
|
|||
18 | // The Views for this model are shared with the bounded int, and can be |
|
|||
19 | // found in widget_int_range.js. |
|
|||
20 | }); No newline at end of file |
|
@@ -14,7 +14,7 b'' | |||||
14 | * @namespace IPython |
|
14 | * @namespace IPython | |
15 | **/ |
|
15 | **/ | |
16 |
|
16 | |||
17 |
define(["notebook/js/widgets/widget"], function( |
|
17 | define(["notebook/js/widgets/widget"], function(WidgetManager){ | |
18 |
|
18 | |||
19 | var IntSliderView = IPython.DOMWidgetView.extend({ |
|
19 | var IntSliderView = IPython.DOMWidgetView.extend({ | |
20 | render : function(){ |
|
20 | render : function(){ | |
@@ -120,7 +120,7 b' define(["notebook/js/widgets/widget"], function(widget_manager){' | |||||
120 | this.touch(); |
|
120 | this.touch(); | |
121 | }, |
|
121 | }, | |
122 | }); |
|
122 | }); | |
123 |
|
|
123 | WidgetManager.register_widget_view('IntSliderView', IntSliderView); | |
124 |
|
124 | |||
125 |
|
125 | |||
126 | var IntTextView = IPython.DOMWidgetView.extend({ |
|
126 | var IntTextView = IPython.DOMWidgetView.extend({ | |
@@ -216,5 +216,5 b' define(["notebook/js/widgets/widget"], function(widget_manager){' | |||||
216 | } |
|
216 | } | |
217 | } |
|
217 | } | |
218 | }); |
|
218 | }); | |
219 |
|
|
219 | WidgetManager.register_widget_view('IntTextView', IntTextView); | |
220 | }); |
|
220 | }); |
@@ -14,7 +14,7 b'' | |||||
14 | * @namespace IPython |
|
14 | * @namespace IPython | |
15 | **/ |
|
15 | **/ | |
16 |
|
16 | |||
17 |
define(["notebook/js/widgets/widget"], function( |
|
17 | define(["notebook/js/widgets/widget"], function(WidgetManager){ | |
18 |
|
18 | |||
19 | var DropdownView = IPython.DOMWidgetView.extend({ |
|
19 | var DropdownView = IPython.DOMWidgetView.extend({ | |
20 | render : function(){ |
|
20 | render : function(){ | |
@@ -114,7 +114,7 b' define(["notebook/js/widgets/widget"], function(widget_manager){' | |||||
114 | }, |
|
114 | }, | |
115 |
|
115 | |||
116 | }); |
|
116 | }); | |
117 |
|
|
117 | WidgetManager.register_widget_view('DropdownView', DropdownView); | |
118 |
|
118 | |||
119 |
|
119 | |||
120 | var RadioButtonsView = IPython.DOMWidgetView.extend({ |
|
120 | var RadioButtonsView = IPython.DOMWidgetView.extend({ | |
@@ -204,7 +204,7 b' define(["notebook/js/widgets/widget"], function(widget_manager){' | |||||
204 | this.touch(); |
|
204 | this.touch(); | |
205 | }, |
|
205 | }, | |
206 | }); |
|
206 | }); | |
207 |
|
|
207 | WidgetManager.register_widget_view('RadioButtonsView', RadioButtonsView); | |
208 |
|
208 | |||
209 |
|
209 | |||
210 | var ToggleButtonsView = IPython.DOMWidgetView.extend({ |
|
210 | var ToggleButtonsView = IPython.DOMWidgetView.extend({ | |
@@ -289,7 +289,7 b' define(["notebook/js/widgets/widget"], function(widget_manager){' | |||||
289 | this.touch(); |
|
289 | this.touch(); | |
290 | }, |
|
290 | }, | |
291 | }); |
|
291 | }); | |
292 |
|
|
292 | WidgetManager.register_widget_view('ToggleButtonsView', ToggleButtonsView); | |
293 |
|
293 | |||
294 |
|
294 | |||
295 | var ListBoxView = IPython.DOMWidgetView.extend({ |
|
295 | var ListBoxView = IPython.DOMWidgetView.extend({ | |
@@ -371,5 +371,5 b' define(["notebook/js/widgets/widget"], function(widget_manager){' | |||||
371 | this.touch(); |
|
371 | this.touch(); | |
372 | }, |
|
372 | }, | |
373 | }); |
|
373 | }); | |
374 |
|
|
374 | WidgetManager.register_widget_view('ListBoxView', ListBoxView); | |
375 | }); |
|
375 | }); |
@@ -14,7 +14,7 b'' | |||||
14 | * @namespace IPython |
|
14 | * @namespace IPython | |
15 | **/ |
|
15 | **/ | |
16 |
|
16 | |||
17 |
define(["notebook/js/widgets/widget"], function( |
|
17 | define(["notebook/js/widgets/widget"], function(WidgetManager){ | |
18 |
|
18 | |||
19 | var AccordionView = IPython.DOMWidgetView.extend({ |
|
19 | var AccordionView = IPython.DOMWidgetView.extend({ | |
20 | render: function(){ |
|
20 | render: function(){ | |
@@ -129,7 +129,7 b' define(["notebook/js/widgets/widget"], function(widget_manager){' | |||||
129 | setTimeout(function(){ that.update(); }, 500); |
|
129 | setTimeout(function(){ that.update(); }, 500); | |
130 | }, |
|
130 | }, | |
131 | }); |
|
131 | }); | |
132 |
|
|
132 | WidgetManager.register_widget_view('AccordionView', AccordionView); | |
133 |
|
133 | |||
134 |
|
134 | |||
135 | var TabView = IPython.DOMWidgetView.extend({ |
|
135 | var TabView = IPython.DOMWidgetView.extend({ | |
@@ -240,5 +240,5 b' define(["notebook/js/widgets/widget"], function(widget_manager){' | |||||
240 | this.containers[index].tab('show'); |
|
240 | this.containers[index].tab('show'); | |
241 | }, |
|
241 | }, | |
242 | }); |
|
242 | }); | |
243 |
|
|
243 | WidgetManager.register_widget_view('TabView', TabView); | |
244 | }); |
|
244 | }); |
@@ -14,7 +14,7 b'' | |||||
14 | * @namespace IPython |
|
14 | * @namespace IPython | |
15 | **/ |
|
15 | **/ | |
16 |
|
16 | |||
17 |
define(["notebook/js/widgets/widget"], function( |
|
17 | define(["notebook/js/widgets/widget"], function(WidgetManager){ | |
18 |
|
18 | |||
19 | var HTMLView = IPython.DOMWidgetView.extend({ |
|
19 | var HTMLView = IPython.DOMWidgetView.extend({ | |
20 | render : function(){ |
|
20 | render : function(){ | |
@@ -31,7 +31,7 b' define(["notebook/js/widgets/widget"], function(widget_manager){' | |||||
31 | return HTMLView.__super__.update.apply(this); |
|
31 | return HTMLView.__super__.update.apply(this); | |
32 | }, |
|
32 | }, | |
33 | }); |
|
33 | }); | |
34 |
|
|
34 | WidgetManager.register_widget_view('HTMLView', HTMLView); | |
35 |
|
35 | |||
36 |
|
36 | |||
37 | var LatexView = IPython.DOMWidgetView.extend({ |
|
37 | var LatexView = IPython.DOMWidgetView.extend({ | |
@@ -51,7 +51,7 b' define(["notebook/js/widgets/widget"], function(widget_manager){' | |||||
51 | return LatexView.__super__.update.apply(this); |
|
51 | return LatexView.__super__.update.apply(this); | |
52 | }, |
|
52 | }, | |
53 | }); |
|
53 | }); | |
54 |
|
|
54 | WidgetManager.register_widget_view('LatexView', LatexView); | |
55 |
|
55 | |||
56 |
|
56 | |||
57 | var TextAreaView = IPython.DOMWidgetView.extend({ |
|
57 | var TextAreaView = IPython.DOMWidgetView.extend({ | |
@@ -124,7 +124,7 b' define(["notebook/js/widgets/widget"], function(widget_manager){' | |||||
124 | this.touch(); |
|
124 | this.touch(); | |
125 | }, |
|
125 | }, | |
126 | }); |
|
126 | }); | |
127 |
|
|
127 | WidgetManager.register_widget_view('TextAreaView', TextAreaView); | |
128 |
|
128 | |||
129 |
|
129 | |||
130 | var TextBoxView = IPython.DOMWidgetView.extend({ |
|
130 | var TextBoxView = IPython.DOMWidgetView.extend({ | |
@@ -193,5 +193,5 b' define(["notebook/js/widgets/widget"], function(widget_manager){' | |||||
193 | } |
|
193 | } | |
194 | }, |
|
194 | }, | |
195 | }); |
|
195 | }); | |
196 |
|
|
196 | WidgetManager.register_widget_view('TextBoxView', TextBoxView); | |
197 | }); |
|
197 | }); |
General Comments 0
You need to be logged in to leave comments.
Login now