Show More
@@ -1,28 +1,33 | |||
|
1 | 1 | // Copyright (c) IPython Development Team. |
|
2 | 2 | // Distributed under the terms of the Modified BSD License. |
|
3 | 3 | |
|
4 | 4 | define([ |
|
5 | 5 | "widgets/js/manager", |
|
6 | "widgets/js/widget_link", | |
|
6 | 7 | "widgets/js/widget_bool", |
|
7 | 8 | "widgets/js/widget_button", |
|
8 | 9 | "widgets/js/widget_box", |
|
9 | 10 | "widgets/js/widget_float", |
|
10 | 11 | "widgets/js/widget_image", |
|
11 | 12 | "widgets/js/widget_int", |
|
12 | "widgets/js/widget_link", | |
|
13 | 13 | "widgets/js/widget_selection", |
|
14 | 14 | "widgets/js/widget_selectioncontainer", |
|
15 | 15 | "widgets/js/widget_string", |
|
16 |
], function(widgetmanager) { |
|
|
16 | ], function(widgetmanager, linkModels) { | |
|
17 | for (var target_name in linkModels) { | |
|
18 | if (linkModels.hasOwnProperty(target_name)) { | |
|
19 | widgetmanager.WidgetManager.register_widget_model(target_name, linkModels[target_name]); | |
|
20 | } | |
|
21 | } | |
|
17 | 22 | |
|
18 | 23 | // Register all of the loaded views with the widget manager. |
|
19 |
for (var i = |
|
|
24 | for (var i = 2; i < arguments.length; i++) { | |
|
20 | 25 | for (var target_name in arguments[i]) { |
|
21 | 26 | if (arguments[i].hasOwnProperty(target_name)) { |
|
22 | 27 | widgetmanager.WidgetManager.register_widget_view(target_name, arguments[i][target_name]); |
|
23 | 28 | } |
|
24 | 29 | } |
|
25 | 30 | } |
|
26 | 31 | |
|
27 | 32 | return {'WidgetManager': widgetmanager.WidgetManager}; |
|
28 | 33 | }); |
General Comments 0
You need to be logged in to leave comments.
Login now