##// END OF EJS Templates
Load the link models
Jason Grout -
Show More
@@ -3,20 +3,25 b''
3
3
4 define([
4 define([
5 "widgets/js/manager",
5 "widgets/js/manager",
6 "widgets/js/widget_link",
6 "widgets/js/widget_bool",
7 "widgets/js/widget_bool",
7 "widgets/js/widget_button",
8 "widgets/js/widget_button",
8 "widgets/js/widget_box",
9 "widgets/js/widget_box",
9 "widgets/js/widget_float",
10 "widgets/js/widget_float",
10 "widgets/js/widget_image",
11 "widgets/js/widget_image",
11 "widgets/js/widget_int",
12 "widgets/js/widget_int",
12 "widgets/js/widget_link",
13 "widgets/js/widget_selection",
13 "widgets/js/widget_selection",
14 "widgets/js/widget_selectioncontainer",
14 "widgets/js/widget_selectioncontainer",
15 "widgets/js/widget_string",
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 // Register all of the loaded views with the widget manager.
23 // Register all of the loaded views with the widget manager.
19 for (var i = 1; i < arguments.length; i++) {
24 for (var i = 2; i < arguments.length; i++) {
20 for (var target_name in arguments[i]) {
25 for (var target_name in arguments[i]) {
21 if (arguments[i].hasOwnProperty(target_name)) {
26 if (arguments[i].hasOwnProperty(target_name)) {
22 widgetmanager.WidgetManager.register_widget_view(target_name, arguments[i][target_name]);
27 widgetmanager.WidgetManager.register_widget_view(target_name, arguments[i][target_name]);
General Comments 0
You need to be logged in to leave comments. Login now