Return dicts instead of classes,

this makes require.js more Python import like.
This commit is contained in:
Jonathan Frederic 2014-06-19 14:31:41 -07:00 committed by Jonathan Frederic
parent 0e9e1dd5a3
commit 0edfdbc703
31 changed files with 35 additions and 33 deletions

View File

@ -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();

View File

@ -43,5 +43,5 @@ define([
// Set module variables
IPython.LoginWidget = LoginWidget;
return LoginWidget;
return {'LoginWidget': LoginWidget};
});

View File

@ -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();
});

View File

@ -154,5 +154,5 @@ define([
// Backwards compatability.
IPython.Dialog = Dialog;
return Dialog;
return {'Dialog': Dialog};
});

View File

@ -15,5 +15,5 @@ define(['base/js/namespace'], function(IPython) {
// Backwards compatability.
IPython.Events = Events;
return Events;
return {'Events': Events};
});

View File

@ -44,5 +44,5 @@ define([
// Register self in the global namespace for convenience.
IPython.Page = Page;
return Page;
return {'Page': Page};
});

View File

@ -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();
});

View File

@ -559,6 +559,6 @@ define([
// Backwards compatability.
IPython.Cell = Cell;
return Cell;
return {'Cell': Cell};
});

View File

@ -411,5 +411,5 @@ define([
// Backwards compatability.
IPython.CellToolbar = CellToolbar;
return CellToolbar;
return {'CellToolbar': CellToolbar};
});

View File

@ -511,5 +511,5 @@ define([
// Backwards compatability.
IPython.CodeCell = CodeCell;
return CodeCell;
return {'CodeCell': CodeCell};
});

View File

@ -383,5 +383,5 @@ define([
// For backwards compatability.
IPython.Completer = Completer;
return Completer;
return {'Completer': Completer};
});

View File

@ -94,5 +94,5 @@ define([], function() {
return filterd;
};
return CodeMirror.contextHint;
return {'contextHint': CodeMirror.contextHint};
});

View File

@ -555,6 +555,5 @@ define([
// For backwards compatability.
IPython.KeyboardManager = KeyboardManager;
return KeyboardManager;
return {'KeyboardManager': KeyboardManager};
});

View File

@ -216,5 +216,5 @@ define([
// Backwards compatability.
IPython.MainToolBar = MainToolBar;
return MainToolBar;
return {'MainToolBar': MainToolBar};
});

View File

@ -343,5 +343,5 @@ define([
// Backwards compatability.
IPython.MenuBar = MenuBar;
return MenuBar;
return {'MenuBar': MenuBar};
});

View File

@ -2477,5 +2477,5 @@ define([
// For backwards compatability.
IPython.Notebook = Notebook;
return Notebook;
return {'Notebook': Notebook};
});

View File

@ -229,5 +229,5 @@ define([
IPython.NotificationArea = NotificationArea;
return NotificationArea;
return {'NotificationArea': NotificationArea};
});

View File

@ -73,5 +73,5 @@ define([
// For backwards compatability.
IPython.NotificationWidget = NotificationWidget;
return NotificationWidget;
return {'NotificationWidget': NotificationWidget};
});

View File

@ -988,5 +988,5 @@ define([
// For backwards compatability.
IPython.OutputArea = OutputArea;
return OutputArea;
return {'OutputArea': OutputArea};
});

View File

@ -174,5 +174,5 @@ define([
// Backwards compatability.
IPython.Pager = Pager;
return Pager;
return {'Pager': Pager};
});

View File

@ -169,5 +169,5 @@ define([
// Backwards compatability.
IPython.QuickHelp = QuickHelp;
return QuickHelp;
return {'QuickHelp': QuickHelp};
});

View File

@ -167,6 +167,6 @@ define([
// Backwards compatability.
IPython.SaveWidget = SaveWidget;
return SaveWidget;
return {'SaveWidget': SaveWidget};
});

View File

@ -97,5 +97,5 @@ define([
// Backwards compatability.
IPython.ToolBar = ToolBar;
return ToolBar;
return {'ToolBar': ToolBar};
});

View File

@ -331,5 +331,5 @@ define([
// Backwards compatability.
IPython.Tooltip = Tooltip;
return Tooltip;
return {'Tooltip': Tooltip};
});

View File

@ -164,7 +164,7 @@ define([
// For backwards compatability.
IPython.NotebookTour = NotebookTour;
return NotebookTour;
return {'NotebookTour': NotebookTour};
});

View File

@ -608,5 +608,5 @@ define([
// Backwards compatability.
IPython.Kernel = Kernel;
return Kernel;
return {'Kernel': Kernel};
});

View File

@ -112,5 +112,5 @@ define([
// For backwards compatability.
IPython.Session = Session;
return Session;
return {'Session': Session};
});

View File

@ -186,5 +186,8 @@ define([
IPython.ClusterList = ClusterList;
IPython.ClusterItem = ClusterItem;
return ClusterList;
return {
'ClusterList': ClusterList,
'ClusterItem': ClusterItem,
};
});

View File

@ -30,5 +30,5 @@ define([
// Backwards compatability.
IPython.KernelList = KernelList;
return KernelList;
return {'KernelList': KernelList};
});

View File

@ -434,5 +434,5 @@ define([
// Backwards compatability.
IPython.NotebookList = NotebookList;
return NotebookList;
return {'NotebookList': NotebookList};
});

View File

@ -45,5 +45,5 @@ define([
// Backwards compatability.
IPython.SesssionList = SesssionList;
return SesssionList;
return {'SesssionList': SesssionList};
});