Load common_config, and load extensions specified therein

pull/37/head
Thomas Kluyver 12 years ago
parent c719d2fe83
commit 01331514bd

@ -32,6 +32,8 @@ require([
contents = new contents.Contents({base_url: base_url});
var config = new configmod.ConfigSection('edit', {base_url: base_url});
config.load();
var common_config = new configmod.ConfigSection('common', common_options);
common_config.load();
var editor = new editmod.Editor('#texteditor-container', {
base_url: base_url,
@ -62,13 +64,8 @@ require([
});
notification_area.init_notification_widgets();
config.loaded.then(function() {
if (config.data.load_extensions) {
var nbextension_paths = Object.getOwnPropertyNames(
config.data.load_extensions);
IPython.load_extensions.apply(this, nbextension_paths);
}
});
utils.load_extensions_from_config(config);
utils.load_extensions_from_config(common_config);
editor.load();
page.show();

@ -62,6 +62,8 @@ require([
var config_section = new configmod.ConfigSection('notebook', common_options);
config_section.load();
var common_config = new configmod.ConfigSection('common', common_options);
common_config.load();
var page = new page.Page();
var pager = new pager.Pager('div#pager', {
events: events});
@ -151,6 +153,7 @@ require([
events.trigger('app_initialized.NotebookApp');
utils.load_extensions_from_config(config_section);
utils.load_extensions_from_config(common_config);
notebook.load_notebook(common_options.notebook_path);
});

@ -6,6 +6,7 @@ require([
'termjs',
'base/js/utils',
'base/js/page',
'services/config',
'terminal/js/terminado',
'custom/custom',
], function(
@ -13,9 +14,14 @@ require([
termjs,
utils,
page,
configmod,
terminado
){
page = new page.Page();
var common_config = new configmod.ConfigSection('common', common_options);
common_config.load();
// Test size: 25x80
var termRowHeight = function(){ return 1.00 * $("#dummy-screen")[0].offsetHeight / 25;};
// 1.02 here arrived at by trial and error to make the spacing look right
@ -43,6 +49,8 @@ require([
page.show_site();
utils.load_extensions_from_config(common_config);
window.onresize = function() {
var geom = calculate_size();
terminal.term.resize(geom.cols, geom.rows);

@ -48,6 +48,8 @@ require([
var cfg = new config.ConfigSection('tree', common_options);
cfg.load();
common_options.config = cfg;
var common_config = new configmod.ConfigSection('common', common_options);
common_config.load();
var session_list = new sesssionlist.SesssionList($.extend({
events: events},
@ -133,6 +135,8 @@ require([
IPython.new_notebook_widget = nnw;
events.trigger('app_initialized.DashboardApp');
utils.load_extensions_from_config(cfg);
utils.load_extensions_from_config(common_config);
// bound the upload method to the on change of the file select list
$("#alternate_upload").change(function (event){

Loading…
Cancel
Save