mirror of
https://github.com/jupyter/notebook.git
synced 2025-03-13 13:17:50 +08:00
Return dicts instead of classes,
this makes require.js more Python import like.
This commit is contained in:
parent
0e9e1dd5a3
commit
0edfdbc703
@ -2,8 +2,8 @@
|
||||
// Distributed under the terms of the Modified BSD License.
|
||||
|
||||
var ipython = ipython || {};
|
||||
require(['base/js/page'], function(Page) {
|
||||
ipython.page = new Page();
|
||||
require(['base/js/page'], function(page) {
|
||||
ipython.page = new page.Page();
|
||||
$('button#login_submit').addClass("btn btn-default");
|
||||
ipython.page.show();
|
||||
$('input#password_input').focus();
|
||||
|
@ -43,5 +43,5 @@ define([
|
||||
// Set module variables
|
||||
IPython.LoginWidget = LoginWidget;
|
||||
|
||||
return LoginWidget;
|
||||
return {'LoginWidget': LoginWidget};
|
||||
});
|
@ -3,7 +3,7 @@
|
||||
|
||||
var ipython = ipython || {};
|
||||
require(['base/js/page'], function(Page) {
|
||||
ipython.page = new Page();
|
||||
ipython.page = new page.Page();
|
||||
$('#ipython-main-app').addClass('border-box-sizing');
|
||||
ipython.page.show();
|
||||
});
|
||||
|
@ -154,5 +154,5 @@ define([
|
||||
// Backwards compatability.
|
||||
IPython.Dialog = Dialog;
|
||||
|
||||
return Dialog;
|
||||
return {'Dialog': Dialog};
|
||||
});
|
||||
|
@ -15,5 +15,5 @@ define(['base/js/namespace'], function(IPython) {
|
||||
// Backwards compatability.
|
||||
IPython.Events = Events;
|
||||
|
||||
return Events;
|
||||
return {'Events': Events};
|
||||
});
|
||||
|
@ -44,5 +44,5 @@ define([
|
||||
|
||||
// Register self in the global namespace for convenience.
|
||||
IPython.Page = Page;
|
||||
return Page;
|
||||
return {'Page': Page};
|
||||
});
|
||||
|
@ -3,6 +3,6 @@
|
||||
|
||||
var ipython = ipython || {};
|
||||
require(['base/js/page'], function(Page) {
|
||||
ipython.page = new Page();
|
||||
ipython.page = new page.Page();
|
||||
ipython.page.show();
|
||||
});
|
||||
|
@ -559,6 +559,6 @@ define([
|
||||
// Backwards compatability.
|
||||
IPython.Cell = Cell;
|
||||
|
||||
return Cell;
|
||||
return {'Cell': Cell};
|
||||
|
||||
});
|
||||
|
@ -411,5 +411,5 @@ define([
|
||||
// Backwards compatability.
|
||||
IPython.CellToolbar = CellToolbar;
|
||||
|
||||
return CellToolbar;
|
||||
return {'CellToolbar': CellToolbar};
|
||||
});
|
||||
|
@ -511,5 +511,5 @@ define([
|
||||
// Backwards compatability.
|
||||
IPython.CodeCell = CodeCell;
|
||||
|
||||
return CodeCell;
|
||||
return {'CodeCell': CodeCell};
|
||||
});
|
||||
|
@ -383,5 +383,5 @@ define([
|
||||
// For backwards compatability.
|
||||
IPython.Completer = Completer;
|
||||
|
||||
return Completer;
|
||||
return {'Completer': Completer};
|
||||
});
|
||||
|
@ -94,5 +94,5 @@ define([], function() {
|
||||
return filterd;
|
||||
};
|
||||
|
||||
return CodeMirror.contextHint;
|
||||
return {'contextHint': CodeMirror.contextHint};
|
||||
});
|
||||
|
@ -555,6 +555,5 @@ define([
|
||||
// For backwards compatability.
|
||||
IPython.KeyboardManager = KeyboardManager;
|
||||
|
||||
return KeyboardManager;
|
||||
|
||||
return {'KeyboardManager': KeyboardManager};
|
||||
});
|
||||
|
@ -216,5 +216,5 @@ define([
|
||||
// Backwards compatability.
|
||||
IPython.MainToolBar = MainToolBar;
|
||||
|
||||
return MainToolBar;
|
||||
return {'MainToolBar': MainToolBar};
|
||||
});
|
||||
|
@ -343,5 +343,5 @@ define([
|
||||
// Backwards compatability.
|
||||
IPython.MenuBar = MenuBar;
|
||||
|
||||
return MenuBar;
|
||||
return {'MenuBar': MenuBar};
|
||||
});
|
||||
|
@ -2477,5 +2477,5 @@ define([
|
||||
// For backwards compatability.
|
||||
IPython.Notebook = Notebook;
|
||||
|
||||
return Notebook;
|
||||
return {'Notebook': Notebook};
|
||||
});
|
||||
|
@ -229,5 +229,5 @@ define([
|
||||
|
||||
IPython.NotificationArea = NotificationArea;
|
||||
|
||||
return NotificationArea;
|
||||
return {'NotificationArea': NotificationArea};
|
||||
});
|
||||
|
@ -73,5 +73,5 @@ define([
|
||||
// For backwards compatability.
|
||||
IPython.NotificationWidget = NotificationWidget;
|
||||
|
||||
return NotificationWidget;
|
||||
return {'NotificationWidget': NotificationWidget};
|
||||
});
|
||||
|
@ -988,5 +988,5 @@ define([
|
||||
// For backwards compatability.
|
||||
IPython.OutputArea = OutputArea;
|
||||
|
||||
return OutputArea;
|
||||
return {'OutputArea': OutputArea};
|
||||
});
|
||||
|
@ -174,5 +174,5 @@ define([
|
||||
// Backwards compatability.
|
||||
IPython.Pager = Pager;
|
||||
|
||||
return Pager;
|
||||
return {'Pager': Pager};
|
||||
});
|
||||
|
@ -169,5 +169,5 @@ define([
|
||||
// Backwards compatability.
|
||||
IPython.QuickHelp = QuickHelp;
|
||||
|
||||
return QuickHelp;
|
||||
return {'QuickHelp': QuickHelp};
|
||||
});
|
||||
|
@ -167,6 +167,6 @@ define([
|
||||
// Backwards compatability.
|
||||
IPython.SaveWidget = SaveWidget;
|
||||
|
||||
return SaveWidget;
|
||||
return {'SaveWidget': SaveWidget};
|
||||
|
||||
});
|
||||
|
@ -97,5 +97,5 @@ define([
|
||||
// Backwards compatability.
|
||||
IPython.ToolBar = ToolBar;
|
||||
|
||||
return ToolBar;
|
||||
return {'ToolBar': ToolBar};
|
||||
});
|
||||
|
@ -331,5 +331,5 @@ define([
|
||||
// Backwards compatability.
|
||||
IPython.Tooltip = Tooltip;
|
||||
|
||||
return Tooltip;
|
||||
return {'Tooltip': Tooltip};
|
||||
});
|
||||
|
@ -164,7 +164,7 @@ define([
|
||||
// For backwards compatability.
|
||||
IPython.NotebookTour = NotebookTour;
|
||||
|
||||
return NotebookTour;
|
||||
return {'NotebookTour': NotebookTour};
|
||||
|
||||
});
|
||||
|
||||
|
@ -608,5 +608,5 @@ define([
|
||||
// Backwards compatability.
|
||||
IPython.Kernel = Kernel;
|
||||
|
||||
return Kernel;
|
||||
return {'Kernel': Kernel};
|
||||
});
|
||||
|
@ -112,5 +112,5 @@ define([
|
||||
// For backwards compatability.
|
||||
IPython.Session = Session;
|
||||
|
||||
return Session;
|
||||
return {'Session': Session};
|
||||
});
|
||||
|
@ -186,5 +186,8 @@ define([
|
||||
IPython.ClusterList = ClusterList;
|
||||
IPython.ClusterItem = ClusterItem;
|
||||
|
||||
return ClusterList;
|
||||
return {
|
||||
'ClusterList': ClusterList,
|
||||
'ClusterItem': ClusterItem,
|
||||
};
|
||||
});
|
||||
|
@ -30,5 +30,5 @@ define([
|
||||
// Backwards compatability.
|
||||
IPython.KernelList = KernelList;
|
||||
|
||||
return KernelList;
|
||||
return {'KernelList': KernelList};
|
||||
});
|
||||
|
@ -434,5 +434,5 @@ define([
|
||||
// Backwards compatability.
|
||||
IPython.NotebookList = NotebookList;
|
||||
|
||||
return NotebookList;
|
||||
return {'NotebookList': NotebookList};
|
||||
});
|
||||
|
@ -45,5 +45,5 @@ define([
|
||||
// Backwards compatability.
|
||||
IPython.SesssionList = SesssionList;
|
||||
|
||||
return SesssionList;
|
||||
return {'SesssionList': SesssionList};
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user