From 99d83a2ad119cc1efdd525fbc984f70a6d15ac3e Mon Sep 17 00:00:00 2001 From: Jonathan Frederic Date: Tue, 7 Jan 2014 15:50:41 -0800 Subject: [PATCH] move backbone sync outside the widget manager class --- IPython/html/static/notebook/js/widgetmanager.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/IPython/html/static/notebook/js/widgetmanager.js b/IPython/html/static/notebook/js/widgetmanager.js index b2359aaee..eddc79dc3 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); - } - }; };