From cd888ad8c39e2a45289115ecb54aefd7bb59411e Mon Sep 17 00:00:00 2001 From: Matthias Bussonnier Date: Mon, 18 May 2015 17:18:56 -0700 Subject: [PATCH] remove rever dependency in sesson and loginwidget --- notebook/static/auth/js/loginwidget.js | 7 +------ notebook/static/base/js/namespace.js | 2 ++ notebook/static/services/sessions/session.js | 7 ++----- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/notebook/static/auth/js/loginwidget.js b/notebook/static/auth/js/loginwidget.js index 87b17f313..00d154dde 100644 --- a/notebook/static/auth/js/loginwidget.js +++ b/notebook/static/auth/js/loginwidget.js @@ -2,10 +2,9 @@ // Distributed under the terms of the Modified BSD License. define([ - 'base/js/namespace', 'base/js/utils', 'jquery', -], function(IPython, utils, $){ +], function(utils, $){ "use strict"; var LoginWidget = function (selector, options) { @@ -19,7 +18,6 @@ define([ }; - LoginWidget.prototype.bind_events = function () { var that = this; this.element.find("button#logout").click(function () { @@ -36,8 +34,5 @@ define([ }); }; - // Set module variables - IPython.LoginWidget = LoginWidget; - return {'LoginWidget': LoginWidget}; }); diff --git a/notebook/static/base/js/namespace.js b/notebook/static/base/js/namespace.js index cce315524..664a6b653 100644 --- a/notebook/static/base/js/namespace.js +++ b/notebook/static/base/js/namespace.js @@ -21,6 +21,8 @@ define(function(){ Jupyter.NotificationWidget = require('base/js/notificationwidget').NotificationWidget; Jupyter.Kernel = require('services/kernels/kernel').Kernel; + Jupyter.Session = require('services/kernels/session').Session; + Jupyter.LoginWidget = require('auth/js/loginwidget').LoginWidget Jupyter.version = "4.0.0.dev"; Jupyter._target = '_blank'; diff --git a/notebook/static/services/sessions/session.js b/notebook/static/services/sessions/session.js index 8eeaaf21c..0e1bcc70b 100644 --- a/notebook/static/services/sessions/session.js +++ b/notebook/static/services/sessions/session.js @@ -2,11 +2,10 @@ // Distributed under the terms of the Modified BSD License. define([ - 'base/js/namespace', 'jquery', 'base/js/utils', 'services/kernels/kernel', -], function(IPython, $, utils, kernel) { +], function($, utils, kernel) { "use strict"; /** @@ -309,11 +308,9 @@ define([ this.name = "SessionAlreadyStarting"; this.message = (message || ""); }; + SessionAlreadyStarting.prototype = Error.prototype; - // For backwards compatability. - IPython.Session = Session; - return { Session: Session, SessionAlreadyStarting: SessionAlreadyStarting