mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-06 11:35:24 +08:00
Trigger app_initialized event *after* the 'global' IPython object is initialized
This commit is contained in:
parent
374518c583
commit
abf86d5324
@ -18,6 +18,7 @@ require([
|
||||
'notebook/js/savewidget',
|
||||
'notebook/js/keyboardmanager',
|
||||
'notebook/js/config',
|
||||
'custom/custom',
|
||||
], function(
|
||||
IPython,
|
||||
$,
|
||||
@ -113,11 +114,8 @@ require([
|
||||
// only do this once
|
||||
events.off('notebook_loaded.Notebook', first_load);
|
||||
};
|
||||
|
||||
events.on('notebook_loaded.Notebook', first_load);
|
||||
events.trigger('app_initialized.NotebookApp');
|
||||
notebook.load_notebook(common_options.notebook_name, common_options.notebook_path);
|
||||
|
||||
|
||||
IPython.page = page;
|
||||
IPython.layout_manager = layout_manager;
|
||||
IPython.notebook = notebook;
|
||||
@ -132,4 +130,8 @@ require([
|
||||
IPython.save_widget = save_widget;
|
||||
IPython.config = user_config;
|
||||
IPython.tooltip = notebook.tooltip;
|
||||
|
||||
events.trigger('app_initialized.NotebookApp');
|
||||
notebook.load_notebook(common_options.notebook_name, common_options.notebook_path);
|
||||
|
||||
});
|
||||
|
@ -14,6 +14,7 @@ require([
|
||||
'auth/js/loginwidget',
|
||||
'jqueryui',
|
||||
'bootstrap',
|
||||
'custom/custom',
|
||||
], function(
|
||||
IPython,
|
||||
$,
|
||||
@ -90,6 +91,16 @@ require([
|
||||
enable_autorefresh();
|
||||
|
||||
page.show();
|
||||
|
||||
// For backwards compatability.
|
||||
IPython.page = page;
|
||||
IPython.notebook_list = notebook_list;
|
||||
IPython.cluster_list = cluster_list;
|
||||
IPython.session_list = session_list;
|
||||
IPython.kernel_list = kernel_list;
|
||||
IPython.login_widget = login_widget;
|
||||
IPython.events = events;
|
||||
|
||||
events.trigger('app_initialized.DashboardApp');
|
||||
|
||||
// bound the upload method to the on change of the file select list
|
||||
@ -107,12 +118,4 @@ require([
|
||||
$("#tabs").find("a[href=" + window.location.hash + "]").click();
|
||||
}
|
||||
|
||||
// For backwards compatability.
|
||||
IPython.page = page;
|
||||
IPython.notebook_list = notebook_list;
|
||||
IPython.cluster_list = cluster_list;
|
||||
IPython.session_list = session_list;
|
||||
IPython.kernel_list = kernel_list;
|
||||
IPython.login_widget = login_widget;
|
||||
IPython.events = events;
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user