From ed3d721cfe72ff282e9bc74206934d6aa4a15cb9 2014-01-16 10:57:15 From: Jonathan Frederic Date: 2014-01-16 10:57:15 Subject: [PATCH] move backbone sync outside the widget manager class --- diff --git a/IPython/html/static/notebook/js/widgetmanager.js b/IPython/html/static/notebook/js/widgetmanager.js index b2359aa..eddc79d 100644 --- a/IPython/html/static/notebook/js/widgetmanager.js +++ b/IPython/html/static/notebook/js/widgetmanager.js @@ -24,6 +24,13 @@ define(["underscore", "backbone", ], function (underscore, backbone) { + + Backbone.sync = function (method, model, options, error) { + var result = model._handle_sync(method, options); + if (options.success) { + options.success(result); + } + }; //-------------------------------------------------------------------- // WidgetManager class @@ -34,13 +41,6 @@ (target_name) and model types. */ this._view_types = {}; /* Dictionary of view names and view types. */ this._models = {}; /* Dictionary of model ids and model instances */ - - Backbone.sync = function (method, model, options, error) { - var result = model._handle_sync(method, options); - if (options.success) { - options.success(result); - } - }; };