Show More
@@ -27,15 +27,19 b' require([' | |||
|
27 | 27 | savewidget, |
|
28 | 28 | notificationarea |
|
29 | 29 | ){ |
|
30 | "use strict"; | |
|
30 | 31 | page = new page.Page(); |
|
31 | 32 | |
|
32 | 33 | var base_url = utils.get_body_data('baseUrl'); |
|
33 | 34 | var file_path = utils.get_body_data('filePath'); |
|
34 | contents = new contents.Contents({base_url: base_url}); | |
|
35 | 35 | var config = new configmod.ConfigSection('edit', {base_url: base_url}); |
|
36 | 36 | config.load(); |
|
37 | 37 | var common_config = new configmod.ConfigSection('common', {base_url: base_url}); |
|
38 | 38 | common_config.load(); |
|
39 | contents = new contents.Contents({ | |
|
40 | base_url: base_url, | |
|
41 | common_config: common_config | |
|
42 | }); | |
|
39 | 43 | |
|
40 | 44 | var editor = new editmod.Editor('#texteditor-container', { |
|
41 | 45 | base_url: base_url, |
@@ -75,9 +75,10 b' require([' | |||
|
75 | 75 | var save_widget = new savewidget.SaveWidget('span#save_widget', { |
|
76 | 76 | events: events, |
|
77 | 77 | keyboard_manager: keyboard_manager}); |
|
78 |
var contents = new contents.Contents( |
|
|
79 | events: events, config:config_section}, | |
|
80 | common_options)); | |
|
78 | var contents = new contents.Contents({ | |
|
79 | base_url: common_options.base_url, | |
|
80 | common_config: common_config | |
|
81 | }); | |
|
81 | 82 | var notebook = new notebook.Notebook('div#notebook', $.extend({ |
|
82 | 83 | events: events, |
|
83 | 84 | keyboard_manager: keyboard_manager, |
@@ -50,13 +50,14 b' require([' | |||
|
50 | 50 | common_options.config = cfg; |
|
51 | 51 | var common_config = new config.ConfigSection('common', common_options); |
|
52 | 52 | common_config.load(); |
|
53 | ||
|
53 | ||
|
54 | 54 | var session_list = new sesssionlist.SesssionList($.extend({ |
|
55 | events: events}, | |
|
56 | common_options)); | |
|
57 | var contents = new contents_service.Contents($.extend({ | |
|
58 | 55 | events: events}, |
|
59 | 56 | common_options)); |
|
57 | var contents = new contents_service.Contents({ | |
|
58 | base_url: common_options.base_url, | |
|
59 | common_config: common_config | |
|
60 | }); | |
|
60 | 61 | var notebook_list = new notebooklist.NotebookList('#notebook_list', $.extend({ |
|
61 | 62 | contents: contents, |
|
62 | 63 | session_list: session_list}, |
@@ -98,16 +99,16 b' require([' | |||
|
98 | 99 | if (terminal_list) { |
|
99 | 100 | terminal_list.load_terminals(); |
|
100 | 101 | } |
|
101 | } | |
|
102 | }; | |
|
102 | 103 | |
|
103 | 104 | var enable_autorefresh = function(){ |
|
104 | 105 | /** |
|
105 | 106 | *refresh immediately , then start interval |
|
106 | 107 | */ |
|
107 | var now = new Date() | |
|
108 | var now = new Date(); | |
|
108 | 109 | |
|
109 | 110 | if (now - _last_refresh < IPython.min_delta_refresh*1000){ |
|
110 | console.log("Reenabling autorefresh too close to last tree refresh, not refreshing immediately again.") | |
|
111 | console.log("Reenabling autorefresh too close to last tree refresh, not refreshing immediately again."); | |
|
111 | 112 | } else { |
|
112 | 113 | _refresh_list(); |
|
113 | 114 | } |
General Comments 0
You need to be logged in to leave comments.
Login now