##// END OF EJS Templates
Merge pull request #7757 from jasongrout/custom-serialization...
Merge pull request #7757 from jasongrout/custom-serialization Custom serialization

File last commit:

r21028:54163055
r21035:d6e249b0 merge
Show More
init.js
34 lines | 1.3 KiB | application/javascript | JavascriptLexer
Jonathan Frederic
Almost done!...
r17198 // Copyright (c) IPython Development Team.
// Distributed under the terms of the Modified BSD License.
Jonathan Frederic
Moved base widget model and view into widgets/base.js
r14470
Jonathan Frederic
renamed: basic_widgets.js -> init.js...
r14546 define([
Jonathan Frederic
Almost done!...
r17198 "widgets/js/manager",
Jason Grout
Register widget models and views that have the right inheritance, rather than the right name....
r21028 "widgets/js/widget",
Jason Grout
Load the link models
r18056 "widgets/js/widget_link",
Jonathan Frederic
Updated require references to point to new files
r15427 "widgets/js/widget_bool",
"widgets/js/widget_button",
Jonathan Frederic
Filenames s/container/box
r17639 "widgets/js/widget_box",
Jonathan Frederic
Updated require references to point to new files
r15427 "widgets/js/widget_float",
"widgets/js/widget_image",
"widgets/js/widget_int",
Jonathan Frederic
Output Widget
r18953 "widgets/js/widget_output",
Jonathan Frederic
Updated require references to point to new files
r15427 "widgets/js/widget_selection",
"widgets/js/widget_selectioncontainer",
"widgets/js/widget_string",
Jason Grout
Register widget models and views that have the right inheritance, rather than the right name....
r21028 ], function(widgetmanager, widget) {
Jason Grout
Change custom serialization to use custom models, rather than transmitting the serializer name across the wire...
r20935 // Register all of the loaded models and views with the widget manager.
Jason Grout
Register widget models and views that have the right inheritance, rather than the right name....
r21028 for (var i = 2; i < arguments.length; i++) {
Jason Grout
Change custom serialization to use custom models, rather than transmitting the serializer name across the wire...
r20935 var module = arguments[i];
for (var target_name in module) {
if (module.hasOwnProperty(target_name)) {
Jason Grout
Register widget models and views that have the right inheritance, rather than the right name....
r21028 var target = module[target_name];
if (target.prototype instanceof widget.WidgetModel) {
widgetmanager.WidgetManager.register_widget_model(target_name, target);
} else if (target.prototype instanceof widget.WidgetView) {
widgetmanager.WidgetManager.register_widget_view(target_name, target);
Jason Grout
Change custom serialization to use custom models, rather than transmitting the serializer name across the wire...
r20935 }
Jonathan Frederic
Almost done!...
r17198 }
}
}
Jonathan Frederic
Fix all the bugs!
r17203 return {'WidgetManager': widgetmanager.WidgetManager};
Jonathan Frederic
Almost done!...
r17198 });