|
|
|
|
@ -1,7 +1,7 @@
|
|
|
|
|
// Copyright (c) Jupyter Development Team.
|
|
|
|
|
// Distributed under the terms of the Modified BSD License.
|
|
|
|
|
|
|
|
|
|
requirejs(['contents'], function(contents) {
|
|
|
|
|
requirejs(['contents'], function(contentsModule) {
|
|
|
|
|
require([
|
|
|
|
|
'base/js/namespace',
|
|
|
|
|
'jquery',
|
|
|
|
|
@ -24,19 +24,19 @@ require([
|
|
|
|
|
'notebook/js/about',
|
|
|
|
|
'notebook/js/searchandreplace'
|
|
|
|
|
], function(
|
|
|
|
|
IPython,
|
|
|
|
|
IPython,
|
|
|
|
|
$,
|
|
|
|
|
notebook,
|
|
|
|
|
notebook,
|
|
|
|
|
configmod,
|
|
|
|
|
utils,
|
|
|
|
|
page,
|
|
|
|
|
utils,
|
|
|
|
|
page,
|
|
|
|
|
events,
|
|
|
|
|
loginwidget,
|
|
|
|
|
maintoolbar,
|
|
|
|
|
pager,
|
|
|
|
|
quickhelp,
|
|
|
|
|
menubar,
|
|
|
|
|
notificationarea,
|
|
|
|
|
loginwidget,
|
|
|
|
|
maintoolbar,
|
|
|
|
|
pager,
|
|
|
|
|
quickhelp,
|
|
|
|
|
menubar,
|
|
|
|
|
notificationarea,
|
|
|
|
|
savewidget,
|
|
|
|
|
actions,
|
|
|
|
|
keyboardmanager,
|
|
|
|
|
@ -51,7 +51,7 @@ require([
|
|
|
|
|
var typeahead = $.typeahead;
|
|
|
|
|
|
|
|
|
|
requirejs(['custom/custom'], function() {});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// BEGIN HARDCODED WIDGETS HACK
|
|
|
|
|
// Try to load the new extension
|
|
|
|
|
utils.load_extension('widgets/extension').catch(function () {
|
|
|
|
|
@ -81,14 +81,14 @@ require([
|
|
|
|
|
events: events});
|
|
|
|
|
var acts = new actions.init();
|
|
|
|
|
var keyboard_manager = new keyboardmanager.KeyboardManager({
|
|
|
|
|
pager: pager,
|
|
|
|
|
events: events,
|
|
|
|
|
pager: pager,
|
|
|
|
|
events: events,
|
|
|
|
|
actions: acts });
|
|
|
|
|
var save_widget = new savewidget.SaveWidget('span#save_widget', {
|
|
|
|
|
events: events,
|
|
|
|
|
events: events,
|
|
|
|
|
keyboard_manager: keyboard_manager});
|
|
|
|
|
acts.extend_env({save_widget:save_widget})
|
|
|
|
|
var contents = new contents.Contents({
|
|
|
|
|
var contents = new contentsModule.Contents({
|
|
|
|
|
base_url: common_options.base_url,
|
|
|
|
|
common_config: common_config
|
|
|
|
|
});
|
|
|
|
|
@ -101,27 +101,27 @@ require([
|
|
|
|
|
common_options));
|
|
|
|
|
var login_widget = new loginwidget.LoginWidget('span#login_widget', common_options);
|
|
|
|
|
var toolbar = new maintoolbar.MainToolBar('#maintoolbar-container', {
|
|
|
|
|
notebook: notebook,
|
|
|
|
|
events: events,
|
|
|
|
|
actions: acts});
|
|
|
|
|
notebook: notebook,
|
|
|
|
|
events: events,
|
|
|
|
|
actions: acts});
|
|
|
|
|
var quick_help = new quickhelp.QuickHelp({
|
|
|
|
|
keyboard_manager: keyboard_manager,
|
|
|
|
|
keyboard_manager: keyboard_manager,
|
|
|
|
|
events: events,
|
|
|
|
|
notebook: notebook});
|
|
|
|
|
keyboard_manager.set_notebook(notebook);
|
|
|
|
|
keyboard_manager.set_quickhelp(quick_help);
|
|
|
|
|
var menubar = new menubar.MenuBar('#menubar', $.extend({
|
|
|
|
|
notebook: notebook,
|
|
|
|
|
notebook: notebook,
|
|
|
|
|
contents: contents,
|
|
|
|
|
events: events,
|
|
|
|
|
save_widget: save_widget,
|
|
|
|
|
events: events,
|
|
|
|
|
save_widget: save_widget,
|
|
|
|
|
quick_help: quick_help,
|
|
|
|
|
actions: acts},
|
|
|
|
|
actions: acts},
|
|
|
|
|
common_options));
|
|
|
|
|
var notification_area = new notificationarea.NotebookNotificationArea(
|
|
|
|
|
'#notification_area', {
|
|
|
|
|
events: events,
|
|
|
|
|
save_widget: save_widget,
|
|
|
|
|
events: events,
|
|
|
|
|
save_widget: save_widget,
|
|
|
|
|
notebook: notebook,
|
|
|
|
|
keyboard_manager: keyboard_manager});
|
|
|
|
|
notification_area.init_notification_widgets();
|
|
|
|
|
@ -150,7 +150,7 @@ require([
|
|
|
|
|
}
|
|
|
|
|
notebook.set_autosave_interval(notebook.minimum_autosave_interval);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
IPython.page = page;
|
|
|
|
|
IPython.notebook = notebook;
|
|
|
|
|
IPython.contents = contents;
|
|
|
|
|
@ -171,7 +171,7 @@ require([
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Object.defineProperty( IPython, 'actions', {
|
|
|
|
|
get: function() {
|
|
|
|
|
get: function() {
|
|
|
|
|
console.warn('accessing "actions" on the global IPython/Jupyter is not recommended. Pass it to your objects contructors at creation time');
|
|
|
|
|
return acts;
|
|
|
|
|
},
|
|
|
|
|
|