Show More
@@ -1,55 +1,53 b'' | |||||
1 | // Copyright (c) IPython Development Team. |
|
1 | // Copyright (c) IPython Development Team. | |
2 | // Distributed under the terms of the Modified BSD License. |
|
2 | // Distributed under the terms of the Modified BSD License. | |
3 |
|
3 | |||
4 | require([ |
|
4 | require([ | |
5 | 'jquery', |
|
|||
6 | 'base/js/namespace', |
|
5 | 'base/js/namespace', | |
7 | 'base/js/utils', |
|
6 | 'base/js/utils', | |
8 | 'base/js/page', |
|
7 | 'base/js/page', | |
9 | 'base/js/events', |
|
8 | 'base/js/events', | |
10 | 'contents', |
|
9 | 'contents', | |
11 | 'texteditor/js/editor', |
|
10 | 'texteditor/js/editor', | |
12 | 'texteditor/js/menubar', |
|
11 | 'texteditor/js/menubar', | |
13 | 'texteditor/js/notificationarea', |
|
12 | 'texteditor/js/notificationarea', | |
14 | 'custom/custom', |
|
13 | 'custom/custom', | |
15 | ], function( |
|
14 | ], function( | |
16 | $, |
|
|||
17 | IPython, |
|
15 | IPython, | |
18 | utils, |
|
16 | utils, | |
19 | page, |
|
17 | page, | |
20 | events, |
|
18 | events, | |
21 | contents, |
|
19 | contents, | |
22 | editor, |
|
20 | editor, | |
23 | menubar, |
|
21 | menubar, | |
24 | notificationarea |
|
22 | notificationarea | |
25 | ){ |
|
23 | ){ | |
26 | page = new page.Page(); |
|
24 | page = new page.Page(); | |
27 |
|
25 | |||
28 | var base_url = utils.get_body_data('baseUrl'); |
|
26 | var base_url = utils.get_body_data('baseUrl'); | |
29 | var file_path = utils.get_body_data('filePath'); |
|
27 | var file_path = utils.get_body_data('filePath'); | |
30 | contents = new contents.Contents({base_url: base_url}); |
|
28 | contents = new contents.Contents({base_url: base_url}); | |
31 |
|
29 | |||
32 | var editor = new editor.Editor('#texteditor-container', { |
|
30 | var editor = new editor.Editor('#texteditor-container', { | |
33 | base_url: base_url, |
|
31 | base_url: base_url, | |
34 | events: events, |
|
32 | events: events, | |
35 | contents: contents, |
|
33 | contents: contents, | |
36 | file_path: file_path, |
|
34 | file_path: file_path, | |
37 | }); |
|
35 | }); | |
38 |
|
36 | |||
39 | // Make it available for debugging |
|
37 | // Make it available for debugging | |
40 | IPython.editor = editor; |
|
38 | IPython.editor = editor; | |
41 |
|
39 | |||
42 | var menus = new menubar.MenuBar('#menubar', { |
|
40 | var menus = new menubar.MenuBar('#menubar', { | |
43 | base_url: base_url, |
|
41 | base_url: base_url, | |
44 | editor: editor, |
|
42 | editor: editor, | |
45 | }); |
|
43 | }); | |
46 |
|
44 | |||
47 | var notification_area = new notificationarea.EditorNotificationArea( |
|
45 | var notification_area = new notificationarea.EditorNotificationArea( | |
48 | '#notification_area', { |
|
46 | '#notification_area', { | |
49 | events: events, |
|
47 | events: events, | |
50 | }); |
|
48 | }); | |
51 | notification_area.init_notification_widgets(); |
|
49 | notification_area.init_notification_widgets(); | |
52 |
|
50 | |||
53 | editor.load(); |
|
51 | editor.load(); | |
54 | page.show(); |
|
52 | page.show(); | |
55 | }); |
|
53 | }); |
General Comments 0
You need to be logged in to leave comments.
Login now