Show More
@@ -1,78 +1,78 b'' | |||||
1 | //---------------------------------------------------------------------------- |
|
1 | //---------------------------------------------------------------------------- | |
2 | // Copyright (C) 2012 The IPython Development Team |
|
2 | // Copyright (C) 2012 The IPython Development Team | |
3 | // |
|
3 | // | |
4 | // Distributed under the terms of the BSD License. The full license is in |
|
4 | // Distributed under the terms of the BSD License. The full license is in | |
5 | // the file COPYING, distributed as part of this software. |
|
5 | // the file COPYING, distributed as part of this software. | |
6 | //---------------------------------------------------------------------------- |
|
6 | //---------------------------------------------------------------------------- | |
7 |
|
7 | |||
8 | //============================================================================ |
|
8 | //============================================================================ | |
9 | // Notebook |
|
9 | // Notebook | |
10 | //============================================================================ |
|
10 | //============================================================================ | |
11 | "use strict"; |
|
|||
12 |
|
11 | |||
13 | /** |
|
12 | /** | |
14 | * @module IPython |
|
13 | * @module IPython | |
15 | * @namespace IPython |
|
14 | * @namespace IPython | |
16 | **/ |
|
15 | **/ | |
17 |
|
16 | |||
18 | define(function () { |
|
17 | var IPython = (function (IPython) { | |
19 | /** |
|
18 | /** | |
20 |
* A place where some stuff can be conf |
|
19 | * A place where some stuff can be confugured. | |
21 | * |
|
20 | * | |
22 | * @class config |
|
21 | * @class config | |
23 | * @static |
|
22 | * @static | |
24 | * |
|
23 | * | |
25 | **/ |
|
24 | **/ | |
26 | var default_config = { |
|
25 | var default_config = { | |
27 | /** |
|
26 | /** | |
28 | * Dictionary of object to autodetect highlight mode for code cell. |
|
27 | * Dictionary of object to autodetect highlight mode for code cell. | |
29 | * Item of the dictionnary should take the form : |
|
28 | * Item of the dictionnary should take the form : | |
30 | * |
|
29 | * | |
31 | * key : {'reg':[list_of_regexp]} |
|
30 | * key : {'reg':[list_of_regexp]} | |
32 | * |
|
31 | * | |
33 | * where `key` will be the code mirror mode name |
|
32 | * where `key` will be the code mirror mode name | |
34 | * and `list_of_regexp` should be a list of regext that should match |
|
33 | * and `list_of_regexp` should be a list of regext that should match | |
35 | * the first line of the cell to trigger this mode. |
|
34 | * the first line of the cell to trigger this mode. | |
36 | * |
|
35 | * | |
37 | * if `key` is prefixed by the `magic_` prefix the codemirror `mode` |
|
36 | * if `key` is prefixed by the `magic_` prefix the codemirror `mode` | |
38 | * will be applied only at the end of the first line |
|
37 | * will be applied only at the end of the first line | |
39 | * |
|
38 | * | |
40 | * @attribute cell_magic_highlight |
|
39 | * @attribute cell_magic_highlight | |
41 | * @example |
|
40 | * @example | |
42 | * This would trigger javascript mode |
|
41 | * This would trigger javascript mode | |
43 | * from the second line if first line start with `%%javascript` or `%%jsmagic` |
|
42 | * from the second line if first line start with `%%javascript` or `%%jsmagic` | |
44 | * |
|
43 | * | |
45 | * cell_magic_highlight['magic_javascript'] = {'reg':[/^%%javascript/,/^%%jsmagic/]} |
|
44 | * cell_magic_highlight['magic_javascript'] = {'reg':[/^%%javascript/,/^%%jsmagic/]} | |
46 | * @example |
|
45 | * @example | |
47 | * This would trigger javascript mode |
|
46 | * This would trigger javascript mode | |
48 | * from the second line if first line start with `var` |
|
47 | * from the second line if first line start with `var` | |
49 | * |
|
48 | * | |
50 | * cell_magic_highlight['javascript'] = {'reg':[/^var/]} |
|
49 | * cell_magic_highlight['javascript'] = {'reg':[/^var/]} | |
51 | */ |
|
50 | */ | |
52 | cell_magic_highlight : { |
|
51 | cell_magic_highlight : { | |
53 | 'magic_javascript':{'reg':[/^%%javascript/]} |
|
52 | 'magic_javascript':{'reg':[/^%%javascript/]} | |
54 | ,'magic_perl' :{'reg':[/^%%perl/]} |
|
53 | ,'magic_perl' :{'reg':[/^%%perl/]} | |
55 | ,'magic_ruby' :{'reg':[/^%%ruby/]} |
|
54 | ,'magic_ruby' :{'reg':[/^%%ruby/]} | |
56 | ,'magic_python' :{'reg':[/^%%python3?/]} |
|
55 | ,'magic_python' :{'reg':[/^%%python3?/]} | |
57 | ,'magic_shell' :{'reg':[/^%%bash/]} |
|
56 | ,'magic_shell' :{'reg':[/^%%bash/]} | |
58 | ,'magic_r' :{'reg':[/^%%R/]} |
|
57 | ,'magic_r' :{'reg':[/^%%R/]} | |
59 | }, |
|
58 | }, | |
60 |
|
59 | |||
61 | /** |
|
60 | /** | |
62 | * same as `cell_magic_highlight` but for raw cells |
|
61 | * same as `cell_magic_highlight` but for raw cells | |
63 | * @attribute raw_cell_highlight |
|
62 | * @attribute raw_cell_highlight | |
64 | */ |
|
63 | */ | |
65 | raw_cell_highlight : { |
|
64 | raw_cell_highlight : { | |
66 | 'diff' :{'reg':[/^diff/]} |
|
65 | 'diff' :{'reg':[/^diff/]} | |
67 | }, |
|
66 | }, | |
68 |
|
67 | |||
69 | tooltip_on_tab : true, |
|
68 | tooltip_on_tab : true, | |
70 | }; |
|
69 | }; | |
71 |
|
70 | |||
72 | // use the same method to merge user configuration |
|
71 | // use the same method to merge user configuration | |
73 |
|
|
72 | IPython.config = {}; | |
74 | $.extend(config, default_config); |
|
73 | $.extend(IPython.config, default_config); | |
75 |
|
74 | |||
76 |
return |
|
75 | return IPython; | |
77 | }); |
|
76 | ||
|
77 | }(IPython)); | |||
78 |
|
78 |
@@ -1,129 +1,125 b'' | |||||
1 | //---------------------------------------------------------------------------- |
|
1 | //---------------------------------------------------------------------------- | |
2 | // Copyright (C) 2011 The IPython Development Team |
|
2 | // Copyright (C) 2011 The IPython Development Team | |
3 | // |
|
3 | // | |
4 | // Distributed under the terms of the BSD License. The full license is in |
|
4 | // Distributed under the terms of the BSD License. The full license is in | |
5 | // the file COPYING, distributed as part of this software. |
|
5 | // the file COPYING, distributed as part of this software. | |
6 | //---------------------------------------------------------------------------- |
|
6 | //---------------------------------------------------------------------------- | |
7 |
|
7 | |||
8 | //============================================================================ |
|
8 | //============================================================================ | |
9 | // On document ready |
|
9 | // On document ready | |
10 | //============================================================================ |
|
10 | //============================================================================ | |
11 | "use strict"; |
|
11 | "use strict"; | |
12 |
|
12 | |||
13 | // for the time beeing, we have to pass marked as a parameter here, |
|
13 | // for the time beeing, we have to pass marked as a parameter here, | |
14 | // as injecting require.js make marked not to put itself in the globals, |
|
14 | // as injecting require.js make marked not to put itself in the globals, | |
15 | // which make both this file fail at setting marked configuration, and textcell.js |
|
15 | // which make both this file fail at setting marked configuration, and textcell.js | |
16 | // which search marked into global. |
|
16 | // which search marked into global. | |
17 | require(['static/components/marked/lib/marked.js', |
|
17 | require(['static/components/marked/lib/marked.js'], | |
18 | 'static/notebook/js/config.js'], |
|
|||
19 |
|
18 | |||
20 |
function (marked |
|
19 | function (marked) { | |
21 |
|
||||
22 | IPython.config = config; |
|
|||
23 | console.log('config is',config); |
|
|||
24 |
|
20 | |||
25 | window.marked = marked |
|
21 | window.marked = marked | |
|
22 | ||||
26 | // monkey patch CM to be able to syntax highlight cell magics |
|
23 | // monkey patch CM to be able to syntax highlight cell magics | |
27 | // bug reported upstream, |
|
24 | // bug reported upstream, | |
28 | // see https://github.com/marijnh/CodeMirror2/issues/670 |
|
25 | // see https://github.com/marijnh/CodeMirror2/issues/670 | |
29 | if(CodeMirror.getMode(1,'text/plain').indent == undefined ){ |
|
26 | if(CodeMirror.getMode(1,'text/plain').indent == undefined ){ | |
30 | console.log('patching CM for undefined indent'); |
|
27 | console.log('patching CM for undefined indent'); | |
31 | CodeMirror.modes.null = function() { |
|
28 | CodeMirror.modes.null = function() { | |
32 | return {token: function(stream) {stream.skipToEnd();},indent : function(){return 0}} |
|
29 | return {token: function(stream) {stream.skipToEnd();},indent : function(){return 0}} | |
33 | } |
|
30 | } | |
34 | } |
|
31 | } | |
35 |
|
32 | |||
36 | CodeMirror.patchedGetMode = function(config, mode){ |
|
33 | CodeMirror.patchedGetMode = function(config, mode){ | |
37 | var cmmode = CodeMirror.getMode(config, mode); |
|
34 | var cmmode = CodeMirror.getMode(config, mode); | |
38 | if(cmmode.indent == null) |
|
35 | if(cmmode.indent == null) | |
39 | { |
|
36 | { | |
40 | console.log('patch mode "' , mode, '" on the fly'); |
|
37 | console.log('patch mode "' , mode, '" on the fly'); | |
41 | cmmode.indent = function(){return 0}; |
|
38 | cmmode.indent = function(){return 0}; | |
42 | } |
|
39 | } | |
43 | return cmmode; |
|
40 | return cmmode; | |
44 | } |
|
41 | } | |
45 | // end monkey patching CodeMirror |
|
42 | // end monkey patching CodeMirror | |
46 |
|
43 | |||
47 | IPython.mathjaxutils.init(); |
|
44 | IPython.mathjaxutils.init(); | |
48 |
|
45 | |||
49 | IPython.read_only = $('body').data('readOnly') === 'True'; |
|
46 | IPython.read_only = $('body').data('readOnly') === 'True'; | |
50 | $('#ipython-main-app').addClass('border-box-sizing'); |
|
47 | $('#ipython-main-app').addClass('border-box-sizing'); | |
51 | $('div#notebook_panel').addClass('border-box-sizing'); |
|
48 | $('div#notebook_panel').addClass('border-box-sizing'); | |
52 | // The header's bottom border is provided by the menu bar so we remove it. |
|
49 | // The header's bottom border is provided by the menu bar so we remove it. | |
53 | $('div#header').css('border-bottom-style','none'); |
|
50 | $('div#header').css('border-bottom-style','none'); | |
54 |
|
51 | |||
55 | var baseProjectUrl = $('body').data('baseProjectUrl') |
|
52 | var baseProjectUrl = $('body').data('baseProjectUrl') | |
56 |
|
53 | |||
57 | IPython.page = new IPython.Page(); |
|
54 | IPython.page = new IPython.Page(); | |
58 | IPython.layout_manager = new IPython.LayoutManager(); |
|
55 | IPython.layout_manager = new IPython.LayoutManager(); | |
59 | IPython.pager = new IPython.Pager('div#pager', 'div#pager_splitter'); |
|
56 | IPython.pager = new IPython.Pager('div#pager', 'div#pager_splitter'); | |
60 | IPython.quick_help = new IPython.QuickHelp(); |
|
57 | IPython.quick_help = new IPython.QuickHelp(); | |
61 | IPython.login_widget = new IPython.LoginWidget('span#login_widget',{baseProjectUrl:baseProjectUrl}); |
|
58 | IPython.login_widget = new IPython.LoginWidget('span#login_widget',{baseProjectUrl:baseProjectUrl}); | |
62 | IPython.notebook = new IPython.Notebook('div#notebook',{baseProjectUrl:baseProjectUrl, read_only:IPython.read_only}); |
|
59 | IPython.notebook = new IPython.Notebook('div#notebook',{baseProjectUrl:baseProjectUrl, read_only:IPython.read_only}); | |
63 | IPython.save_widget = new IPython.SaveWidget('span#save_widget'); |
|
60 | IPython.save_widget = new IPython.SaveWidget('span#save_widget'); | |
64 | IPython.menubar = new IPython.MenuBar('#menubar',{baseProjectUrl:baseProjectUrl}) |
|
61 | IPython.menubar = new IPython.MenuBar('#menubar',{baseProjectUrl:baseProjectUrl}) | |
65 | IPython.toolbar = new IPython.MainToolBar('#maintoolbar') |
|
62 | IPython.toolbar = new IPython.MainToolBar('#maintoolbar') | |
66 | IPython.tooltip = new IPython.Tooltip() |
|
63 | IPython.tooltip = new IPython.Tooltip() | |
67 | IPython.notification_area = new IPython.NotificationArea('#notification_area') |
|
64 | IPython.notification_area = new IPython.NotificationArea('#notification_area') | |
68 | IPython.notification_area.init_notification_widgets(); |
|
65 | IPython.notification_area.init_notification_widgets(); | |
69 |
|
66 | |||
70 | IPython.layout_manager.do_resize(); |
|
67 | IPython.layout_manager.do_resize(); | |
71 |
|
68 | |||
72 | $('body').append('<div id="fonttest"><pre><span id="test1">x</span>'+ |
|
69 | $('body').append('<div id="fonttest"><pre><span id="test1">x</span>'+ | |
73 | '<span id="test2" style="font-weight: bold;">x</span>'+ |
|
70 | '<span id="test2" style="font-weight: bold;">x</span>'+ | |
74 | '<span id="test3" style="font-style: italic;">x</span></pre></div>') |
|
71 | '<span id="test3" style="font-style: italic;">x</span></pre></div>') | |
75 | var nh = $('#test1').innerHeight(); |
|
72 | var nh = $('#test1').innerHeight(); | |
76 | var bh = $('#test2').innerHeight(); |
|
73 | var bh = $('#test2').innerHeight(); | |
77 | var ih = $('#test3').innerHeight(); |
|
74 | var ih = $('#test3').innerHeight(); | |
78 | if(nh != bh || nh != ih) { |
|
75 | if(nh != bh || nh != ih) { | |
79 | $('head').append('<style>.CodeMirror span { vertical-align: bottom; }</style>'); |
|
76 | $('head').append('<style>.CodeMirror span { vertical-align: bottom; }</style>'); | |
80 | } |
|
77 | } | |
81 | $('#fonttest').remove(); |
|
78 | $('#fonttest').remove(); | |
82 |
|
79 | |||
83 | if(IPython.read_only){ |
|
80 | if(IPython.read_only){ | |
84 | // hide various elements from read-only view |
|
81 | // hide various elements from read-only view | |
85 | $('div#pager').remove(); |
|
82 | $('div#pager').remove(); | |
86 | $('div#pager_splitter').remove(); |
|
83 | $('div#pager_splitter').remove(); | |
87 |
|
84 | |||
88 | // set the notebook name field as not modifiable |
|
85 | // set the notebook name field as not modifiable | |
89 | $('#notebook_name').attr('disabled','disabled') |
|
86 | $('#notebook_name').attr('disabled','disabled') | |
90 | } |
|
87 | } | |
91 |
|
88 | |||
92 | IPython.page.show(); |
|
89 | IPython.page.show(); | |
93 |
|
90 | |||
94 | IPython.layout_manager.do_resize(); |
|
91 | IPython.layout_manager.do_resize(); | |
95 | var first_load = function () { |
|
92 | var first_load = function () { | |
96 | IPython.layout_manager.do_resize(); |
|
93 | IPython.layout_manager.do_resize(); | |
97 | var hash = document.location.hash; |
|
94 | var hash = document.location.hash; | |
98 | if (hash) { |
|
95 | if (hash) { | |
99 | document.location.hash = ''; |
|
96 | document.location.hash = ''; | |
100 | document.location.hash = hash; |
|
97 | document.location.hash = hash; | |
101 | } |
|
98 | } | |
102 | IPython.notebook.set_autosave_interval(IPython.notebook.minimum_autosave_interval); |
|
99 | IPython.notebook.set_autosave_interval(IPython.notebook.minimum_autosave_interval); | |
103 | // only do this once |
|
100 | // only do this once | |
104 | $([IPython.events]).off('notebook_loaded.Notebook', first_load); |
|
101 | $([IPython.events]).off('notebook_loaded.Notebook', first_load); | |
105 | }; |
|
102 | }; | |
106 |
|
103 | |||
107 | $([IPython.events]).on('notebook_loaded.Notebook', first_load); |
|
104 | $([IPython.events]).on('notebook_loaded.Notebook', first_load); | |
108 | IPython.notebook.load_notebook($('body').data('notebookId')); |
|
105 | IPython.notebook.load_notebook($('body').data('notebookId')); | |
109 |
|
106 | |||
110 | var marked; |
|
|||
111 | if (marked) { |
|
107 | if (marked) { | |
112 | marked.setOptions({ |
|
108 | marked.setOptions({ | |
113 | gfm : true, |
|
109 | gfm : true, | |
114 | tables: true, |
|
110 | tables: true, | |
115 | langPrefix: "language-", |
|
111 | langPrefix: "language-", | |
116 | highlight: function(code, lang) { |
|
112 | highlight: function(code, lang) { | |
117 | var highlighted; |
|
113 | var highlighted; | |
118 | try { |
|
114 | try { | |
119 | highlighted = hljs.highlight(lang, code, false); |
|
115 | highlighted = hljs.highlight(lang, code, false); | |
120 | } catch(err) { |
|
116 | } catch(err) { | |
121 | highlighted = hljs.highlightAuto(code); |
|
117 | highlighted = hljs.highlightAuto(code); | |
122 | } |
|
118 | } | |
123 | return highlighted.value; |
|
119 | return highlighted.value; | |
124 | } |
|
120 | } | |
125 | }) |
|
121 | }) | |
126 | } |
|
122 | } | |
127 | } |
|
123 | } | |
128 |
|
124 | |||
129 | ); |
|
125 | ); |
@@ -1,240 +1,241 b'' | |||||
1 | {% extends "page.html" %} |
|
1 | {% extends "page.html" %} | |
2 |
|
2 | |||
3 | {% block stylesheet %} |
|
3 | {% block stylesheet %} | |
4 |
|
4 | |||
5 | {% if mathjax_url %} |
|
5 | {% if mathjax_url %} | |
6 | <script type="text/javascript" src="{{mathjax_url}}?config=TeX-AMS_HTML-full&delayStartupUntil=configured" charset="utf-8"></script> |
|
6 | <script type="text/javascript" src="{{mathjax_url}}?config=TeX-AMS_HTML-full&delayStartupUntil=configured" charset="utf-8"></script> | |
7 | {% endif %} |
|
7 | {% endif %} | |
8 | <script type="text/javascript"> |
|
8 | <script type="text/javascript"> | |
9 | // MathJax disabled, set as null to distingish from *missing* MathJax, |
|
9 | // MathJax disabled, set as null to distingish from *missing* MathJax, | |
10 | // where it will be undefined, and should prompt a dialog later. |
|
10 | // where it will be undefined, and should prompt a dialog later. | |
11 | window.mathjax_url = "{{mathjax_url}}"; |
|
11 | window.mathjax_url = "{{mathjax_url}}"; | |
12 | </script> |
|
12 | </script> | |
13 |
|
13 | |||
14 | <link rel="stylesheet" href="{{ static_url("components/codemirror/lib/codemirror.css") }}"> |
|
14 | <link rel="stylesheet" href="{{ static_url("components/codemirror/lib/codemirror.css") }}"> | |
15 |
|
15 | |||
16 | {{super()}} |
|
16 | {{super()}} | |
17 |
|
17 | |||
18 | <link rel="stylesheet" href="{{ static_url("notebook/css/override.css") }}" type="text/css" /> |
|
18 | <link rel="stylesheet" href="{{ static_url("notebook/css/override.css") }}" type="text/css" /> | |
19 |
|
19 | |||
20 | {% endblock %} |
|
20 | {% endblock %} | |
21 |
|
21 | |||
22 | {% block params %} |
|
22 | {% block params %} | |
23 |
|
23 | |||
24 | data-project={{project}} |
|
24 | data-project={{project}} | |
25 | data-base-project-url={{base_project_url}} |
|
25 | data-base-project-url={{base_project_url}} | |
26 | data-base-kernel-url={{base_kernel_url}} |
|
26 | data-base-kernel-url={{base_kernel_url}} | |
27 | data-read-only={{read_only and not logged_in}} |
|
27 | data-read-only={{read_only and not logged_in}} | |
28 | data-notebook-id={{notebook_id}} |
|
28 | data-notebook-id={{notebook_id}} | |
29 | class="notebook_app" |
|
29 | class="notebook_app" | |
30 |
|
30 | |||
31 | {% endblock %} |
|
31 | {% endblock %} | |
32 |
|
32 | |||
33 |
|
33 | |||
34 | {% block header %} |
|
34 | {% block header %} | |
35 |
|
35 | |||
36 | <span id="save_widget"> |
|
36 | <span id="save_widget"> | |
37 | <span id="notebook_name"></span> |
|
37 | <span id="notebook_name"></span> | |
38 | <span id="checkpoint_status"></span> |
|
38 | <span id="checkpoint_status"></span> | |
39 | <span id="autosave_status"></span> |
|
39 | <span id="autosave_status"></span> | |
40 | </span> |
|
40 | </span> | |
41 |
|
41 | |||
42 | {% endblock %} |
|
42 | {% endblock %} | |
43 |
|
43 | |||
44 |
|
44 | |||
45 | {% block site %} |
|
45 | {% block site %} | |
46 |
|
46 | |||
47 | <div id="menubar_container"> |
|
47 | <div id="menubar_container"> | |
48 | <div id="menubar"> |
|
48 | <div id="menubar"> | |
49 | <ul id="menus"> |
|
49 | <ul id="menus"> | |
50 | <li><a href="#">File</a> |
|
50 | <li><a href="#">File</a> | |
51 | <ul> |
|
51 | <ul> | |
52 | <li id="new_notebook"><a href="#">New</a></li> |
|
52 | <li id="new_notebook"><a href="#">New</a></li> | |
53 | <li id="open_notebook"><a href="#">Open...</a></li> |
|
53 | <li id="open_notebook"><a href="#">Open...</a></li> | |
54 | <hr/> |
|
54 | <hr/> | |
55 | <li id="copy_notebook"><a href="#">Make a Copy...</a></li> |
|
55 | <li id="copy_notebook"><a href="#">Make a Copy...</a></li> | |
56 | <li id="rename_notebook"><a href="#">Rename...</a></li> |
|
56 | <li id="rename_notebook"><a href="#">Rename...</a></li> | |
57 | <li id="save_checkpoint"><a href="#">Save and Checkpoint</a></li> |
|
57 | <li id="save_checkpoint"><a href="#">Save and Checkpoint</a></li> | |
58 | <hr/> |
|
58 | <hr/> | |
59 | <li id="restore_checkpoint"><a href="#">Revert to Checkpoint</a> |
|
59 | <li id="restore_checkpoint"><a href="#">Revert to Checkpoint</a> | |
60 | <ul> |
|
60 | <ul> | |
61 | <li><a href="#"></a></li> |
|
61 | <li><a href="#"></a></li> | |
62 | <li><a href="#"></a></li> |
|
62 | <li><a href="#"></a></li> | |
63 | <li><a href="#"></a></li> |
|
63 | <li><a href="#"></a></li> | |
64 | <li><a href="#"></a></li> |
|
64 | <li><a href="#"></a></li> | |
65 | <li><a href="#"></a></li> |
|
65 | <li><a href="#"></a></li> | |
66 | </ul> |
|
66 | </ul> | |
67 | </li> |
|
67 | </li> | |
68 | <hr/> |
|
68 | <hr/> | |
69 | <li><a href="#">Download as</a> |
|
69 | <li><a href="#">Download as</a> | |
70 | <ul> |
|
70 | <ul> | |
71 | <li id="download_ipynb"><a href="#">IPython (.ipynb)</a></li> |
|
71 | <li id="download_ipynb"><a href="#">IPython (.ipynb)</a></li> | |
72 | <li id="download_py"><a href="#">Python (.py)</a></li> |
|
72 | <li id="download_py"><a href="#">Python (.py)</a></li> | |
73 | </ul> |
|
73 | </ul> | |
74 | </li> |
|
74 | </li> | |
75 | <!--<hr/> |
|
75 | <!--<hr/> | |
76 | <li id="print_notebook"><a href="/{{notebook_id}}/print" target="_blank">Print View</a></li>--> |
|
76 | <li id="print_notebook"><a href="/{{notebook_id}}/print" target="_blank">Print View</a></li>--> | |
77 | <hr/> |
|
77 | <hr/> | |
78 | <li id="kill_and_exit"><a href="#" >Close and halt</a></li> |
|
78 | <li id="kill_and_exit"><a href="#" >Close and halt</a></li> | |
79 | </ul> |
|
79 | </ul> | |
80 | </li> |
|
80 | </li> | |
81 | <li><a href="#">Edit</a> |
|
81 | <li><a href="#">Edit</a> | |
82 | <ul> |
|
82 | <ul> | |
83 | <li id="cut_cell"><a href="#">Cut Cell</a></li> |
|
83 | <li id="cut_cell"><a href="#">Cut Cell</a></li> | |
84 | <li id="copy_cell"><a href="#">Copy Cell</a></li> |
|
84 | <li id="copy_cell"><a href="#">Copy Cell</a></li> | |
85 | <li id="paste_cell_above" class="ui-state-disabled"><a href="#">Paste Cell Above</a></li> |
|
85 | <li id="paste_cell_above" class="ui-state-disabled"><a href="#">Paste Cell Above</a></li> | |
86 | <li id="paste_cell_below" class="ui-state-disabled"><a href="#">Paste Cell Below</a></li> |
|
86 | <li id="paste_cell_below" class="ui-state-disabled"><a href="#">Paste Cell Below</a></li> | |
87 | <li id="paste_cell_replace" class="ui-state-disabled"><a href="#">Paste Cell & Replace</a></li> |
|
87 | <li id="paste_cell_replace" class="ui-state-disabled"><a href="#">Paste Cell & Replace</a></li> | |
88 | <li id="delete_cell"><a href="#">Delete Cell</a></li> |
|
88 | <li id="delete_cell"><a href="#">Delete Cell</a></li> | |
89 | <li id="undelete_cell" class="ui-state-disabled"><a href="#">Undo Delete Cell</a></li> |
|
89 | <li id="undelete_cell" class="ui-state-disabled"><a href="#">Undo Delete Cell</a></li> | |
90 | <hr/> |
|
90 | <hr/> | |
91 | <li id="split_cell"><a href="#">Split Cell</a></li> |
|
91 | <li id="split_cell"><a href="#">Split Cell</a></li> | |
92 | <li id="merge_cell_above"><a href="#">Merge Cell Above</a></li> |
|
92 | <li id="merge_cell_above"><a href="#">Merge Cell Above</a></li> | |
93 | <li id="merge_cell_below"><a href="#">Merge Cell Below</a></li> |
|
93 | <li id="merge_cell_below"><a href="#">Merge Cell Below</a></li> | |
94 | <hr/> |
|
94 | <hr/> | |
95 | <li id="move_cell_up"><a href="#">Move Cell Up</a></li> |
|
95 | <li id="move_cell_up"><a href="#">Move Cell Up</a></li> | |
96 | <li id="move_cell_down"><a href="#">Move Cell Down</a></li> |
|
96 | <li id="move_cell_down"><a href="#">Move Cell Down</a></li> | |
97 | <hr/> |
|
97 | <hr/> | |
98 | <li id="select_previous"><a href="#">Select Previous Cell</a></li> |
|
98 | <li id="select_previous"><a href="#">Select Previous Cell</a></li> | |
99 | <li id="select_next"><a href="#">Select Next Cell</a></li> |
|
99 | <li id="select_next"><a href="#">Select Next Cell</a></li> | |
100 | </ul> |
|
100 | </ul> | |
101 | </li> |
|
101 | </li> | |
102 | <li><a href="#">View</a> |
|
102 | <li><a href="#">View</a> | |
103 | <ul> |
|
103 | <ul> | |
104 | <li id="toggle_header"><a href="#">Toggle Header</a></li> |
|
104 | <li id="toggle_header"><a href="#">Toggle Header</a></li> | |
105 | <li id="toggle_toolbar"><a href="#">Toggle Toolbar</a></li> |
|
105 | <li id="toggle_toolbar"><a href="#">Toggle Toolbar</a></li> | |
106 | </ul> |
|
106 | </ul> | |
107 | </li> |
|
107 | </li> | |
108 | <li><a href="#">Insert</a> |
|
108 | <li><a href="#">Insert</a> | |
109 | <ul> |
|
109 | <ul> | |
110 | <li id="insert_cell_above"><a href="#">Insert Cell Above</a></li> |
|
110 | <li id="insert_cell_above"><a href="#">Insert Cell Above</a></li> | |
111 | <li id="insert_cell_below"><a href="#">Insert Cell Below</a></li> |
|
111 | <li id="insert_cell_below"><a href="#">Insert Cell Below</a></li> | |
112 | </ul> |
|
112 | </ul> | |
113 | </li> |
|
113 | </li> | |
114 | <li><a href="#">Cell</a> |
|
114 | <li><a href="#">Cell</a> | |
115 | <ul> |
|
115 | <ul> | |
116 | <li id="run_cell"><a href="#">Run</a></li> |
|
116 | <li id="run_cell"><a href="#">Run</a></li> | |
117 | <li id="run_cell_in_place"><a href="#">Run in Place</a></li> |
|
117 | <li id="run_cell_in_place"><a href="#">Run in Place</a></li> | |
118 | <li id="run_all_cells"><a href="#">Run All</a></li> |
|
118 | <li id="run_all_cells"><a href="#">Run All</a></li> | |
119 | <li id="run_all_cells_above"><a href="#">Run All Above</a></li> |
|
119 | <li id="run_all_cells_above"><a href="#">Run All Above</a></li> | |
120 | <li id="run_all_cells_below"><a href="#">Run All Below</a></li> |
|
120 | <li id="run_all_cells_below"><a href="#">Run All Below</a></li> | |
121 | <hr/> |
|
121 | <hr/> | |
122 | <li id="to_code"><a href="#">Code</a></li> |
|
122 | <li id="to_code"><a href="#">Code</a></li> | |
123 | <li id="to_markdown"><a href="#">Markdown </a></li> |
|
123 | <li id="to_markdown"><a href="#">Markdown </a></li> | |
124 | <li id="to_raw"><a href="#">Raw Text</a></li> |
|
124 | <li id="to_raw"><a href="#">Raw Text</a></li> | |
125 | <li id="to_heading1"><a href="#">Heading 1</a></li> |
|
125 | <li id="to_heading1"><a href="#">Heading 1</a></li> | |
126 | <li id="to_heading2"><a href="#">Heading 2</a></li> |
|
126 | <li id="to_heading2"><a href="#">Heading 2</a></li> | |
127 | <li id="to_heading3"><a href="#">Heading 3</a></li> |
|
127 | <li id="to_heading3"><a href="#">Heading 3</a></li> | |
128 | <li id="to_heading4"><a href="#">Heading 4</a></li> |
|
128 | <li id="to_heading4"><a href="#">Heading 4</a></li> | |
129 | <li id="to_heading5"><a href="#">Heading 5</a></li> |
|
129 | <li id="to_heading5"><a href="#">Heading 5</a></li> | |
130 | <li id="to_heading6"><a href="#">Heading 6</a></li> |
|
130 | <li id="to_heading6"><a href="#">Heading 6</a></li> | |
131 | <hr/> |
|
131 | <hr/> | |
132 | <li id="toggle_output"><a href="#">Toggle Current Output</a></li> |
|
132 | <li id="toggle_output"><a href="#">Toggle Current Output</a></li> | |
133 | <li id="all_outputs"><a href="#">All Output</a> |
|
133 | <li id="all_outputs"><a href="#">All Output</a> | |
134 | <ul> |
|
134 | <ul> | |
135 | <li id="expand_all_output"><a href="#">Expand</a></li> |
|
135 | <li id="expand_all_output"><a href="#">Expand</a></li> | |
136 | <li id="scroll_all_output"><a href="#">Scroll Long</a></li> |
|
136 | <li id="scroll_all_output"><a href="#">Scroll Long</a></li> | |
137 | <li id="collapse_all_output"><a href="#">Collapse</a></li> |
|
137 | <li id="collapse_all_output"><a href="#">Collapse</a></li> | |
138 | <li id="clear_all_output"><a href="#">Clear</a></li> |
|
138 | <li id="clear_all_output"><a href="#">Clear</a></li> | |
139 | </ul> |
|
139 | </ul> | |
140 | </li> |
|
140 | </li> | |
141 | </ul> |
|
141 | </ul> | |
142 | </li> |
|
142 | </li> | |
143 | <li><a href="#">Kernel</a> |
|
143 | <li><a href="#">Kernel</a> | |
144 | <ul> |
|
144 | <ul> | |
145 | <li id="int_kernel"><a href="#">Interrupt</a></li> |
|
145 | <li id="int_kernel"><a href="#">Interrupt</a></li> | |
146 | <li id="restart_kernel"><a href="#">Restart</a></li> |
|
146 | <li id="restart_kernel"><a href="#">Restart</a></li> | |
147 | </ul> |
|
147 | </ul> | |
148 | </li> |
|
148 | </li> | |
149 | <li><a href="#">Help</a> |
|
149 | <li><a href="#">Help</a> | |
150 | <ul> |
|
150 | <ul> | |
151 | <li><a href="http://ipython.org/documentation.html" target="_blank">IPython Help</a></li> |
|
151 | <li><a href="http://ipython.org/documentation.html" target="_blank">IPython Help</a></li> | |
152 | <li><a href="http://ipython.org/ipython-doc/stable/interactive/htmlnotebook.html" target="_blank">Notebook Help</a></li> |
|
152 | <li><a href="http://ipython.org/ipython-doc/stable/interactive/htmlnotebook.html" target="_blank">Notebook Help</a></li> | |
153 | <li id="keyboard_shortcuts"><a href="#">Keyboard Shortcuts</a></li> |
|
153 | <li id="keyboard_shortcuts"><a href="#">Keyboard Shortcuts</a></li> | |
154 | <hr/> |
|
154 | <hr/> | |
155 | <li><a href="http://docs.python.org" target="_blank">Python</a></li> |
|
155 | <li><a href="http://docs.python.org" target="_blank">Python</a></li> | |
156 | <li><a href="http://docs.scipy.org/doc/numpy/reference/" target="_blank">NumPy</a></li> |
|
156 | <li><a href="http://docs.scipy.org/doc/numpy/reference/" target="_blank">NumPy</a></li> | |
157 | <li><a href="http://docs.scipy.org/doc/scipy/reference/" target="_blank">SciPy</a></li> |
|
157 | <li><a href="http://docs.scipy.org/doc/scipy/reference/" target="_blank">SciPy</a></li> | |
158 | <li><a href="http://docs.sympy.org/dev/index.html" target="_blank">SymPy</a></li> |
|
158 | <li><a href="http://docs.sympy.org/dev/index.html" target="_blank">SymPy</a></li> | |
159 | <li><a href="http://matplotlib.sourceforge.net/" target="_blank">Matplotlib</a></li> |
|
159 | <li><a href="http://matplotlib.sourceforge.net/" target="_blank">Matplotlib</a></li> | |
160 | </ul> |
|
160 | </ul> | |
161 | </li> |
|
161 | </li> | |
162 | </ul> |
|
162 | </ul> | |
163 |
|
163 | |||
164 | </div> |
|
164 | </div> | |
165 | <div id="notification_area"> |
|
165 | <div id="notification_area"> | |
166 | </div> |
|
166 | </div> | |
167 | </div> |
|
167 | </div> | |
168 |
|
168 | |||
169 |
|
169 | |||
170 | <div id="maintoolbar"></div> |
|
170 | <div id="maintoolbar"></div> | |
171 |
|
171 | |||
172 | <div id="ipython-main-app"> |
|
172 | <div id="ipython-main-app"> | |
173 |
|
173 | |||
174 | <div id="notebook_panel"> |
|
174 | <div id="notebook_panel"> | |
175 | <div id="notebook"></div> |
|
175 | <div id="notebook"></div> | |
176 | <div id="pager_splitter"></div> |
|
176 | <div id="pager_splitter"></div> | |
177 | <div id="pager_container"> |
|
177 | <div id="pager_container"> | |
178 | <div id='pager_button_area'> |
|
178 | <div id='pager_button_area'> | |
179 | </div> |
|
179 | </div> | |
180 | <div id="pager"></div> |
|
180 | <div id="pager"></div> | |
181 | </div> |
|
181 | </div> | |
182 | </div> |
|
182 | </div> | |
183 |
|
183 | |||
184 | </div> |
|
184 | </div> | |
185 | <div id='tooltip' class='ipython_tooltip' style='display:none'></div> |
|
185 | <div id='tooltip' class='ipython_tooltip' style='display:none'></div> | |
186 |
|
186 | |||
187 |
|
187 | |||
188 | {% endblock %} |
|
188 | {% endblock %} | |
189 |
|
189 | |||
190 |
|
190 | |||
191 | {% block script %} |
|
191 | {% block script %} | |
192 |
|
192 | |||
193 | {{super()}} |
|
193 | {{super()}} | |
194 |
|
194 | |||
195 | <script src="{{ static_url("components/codemirror/lib/codemirror.js") }}" charset="utf-8"></script> |
|
195 | <script src="{{ static_url("components/codemirror/lib/codemirror.js") }}" charset="utf-8"></script> | |
196 | <script src="{{ static_url("components/codemirror/addon/mode/loadmode.js") }}" charset="utf-8"></script> |
|
196 | <script src="{{ static_url("components/codemirror/addon/mode/loadmode.js") }}" charset="utf-8"></script> | |
197 | <script src="{{ static_url("components/codemirror/addon/mode/multiplex.js") }}" charset="utf-8"></script> |
|
197 | <script src="{{ static_url("components/codemirror/addon/mode/multiplex.js") }}" charset="utf-8"></script> | |
198 | <script src="{{ static_url("components/codemirror/addon/mode/overlay.js") }}" charset="utf-8"></script> |
|
198 | <script src="{{ static_url("components/codemirror/addon/mode/overlay.js") }}" charset="utf-8"></script> | |
199 | <script src="{{ static_url("notebook/js/codemirror-ipython.js") }}" charset="utf-8"></script> |
|
199 | <script src="{{ static_url("notebook/js/codemirror-ipython.js") }}" charset="utf-8"></script> | |
200 | <script src="{{ static_url("components/codemirror/mode/htmlmixed/htmlmixed.js") }}" charset="utf-8"></script> |
|
200 | <script src="{{ static_url("components/codemirror/mode/htmlmixed/htmlmixed.js") }}" charset="utf-8"></script> | |
201 | <script src="{{ static_url("components/codemirror/mode/xml/xml.js") }}" charset="utf-8"></script> |
|
201 | <script src="{{ static_url("components/codemirror/mode/xml/xml.js") }}" charset="utf-8"></script> | |
202 | <script src="{{ static_url("components/codemirror/mode/javascript/javascript.js") }}" charset="utf-8"></script> |
|
202 | <script src="{{ static_url("components/codemirror/mode/javascript/javascript.js") }}" charset="utf-8"></script> | |
203 | <script src="{{ static_url("components/codemirror/mode/css/css.js") }}" charset="utf-8"></script> |
|
203 | <script src="{{ static_url("components/codemirror/mode/css/css.js") }}" charset="utf-8"></script> | |
204 | <script src="{{ static_url("components/codemirror/mode/rst/rst.js") }}" charset="utf-8"></script> |
|
204 | <script src="{{ static_url("components/codemirror/mode/rst/rst.js") }}" charset="utf-8"></script> | |
205 | <script src="{{ static_url("components/codemirror/mode/markdown/markdown.js") }}" charset="utf-8"></script> |
|
205 | <script src="{{ static_url("components/codemirror/mode/markdown/markdown.js") }}" charset="utf-8"></script> | |
206 | <script src="{{ static_url("components/codemirror/mode/gfm/gfm.js") }}" charset="utf-8"></script> |
|
206 | <script src="{{ static_url("components/codemirror/mode/gfm/gfm.js") }}" charset="utf-8"></script> | |
207 |
|
207 | |||
208 | <script src="{{ static_url("components/highlight.js/build/highlight.pack.js") }}" charset="utf-8"></script> |
|
208 | <script src="{{ static_url("components/highlight.js/build/highlight.pack.js") }}" charset="utf-8"></script> | |
209 |
|
209 | |||
210 | <script src="{{ static_url("dateformat/date.format.js") }}" charset="utf-8"></script> |
|
210 | <script src="{{ static_url("dateformat/date.format.js") }}" charset="utf-8"></script> | |
211 |
|
211 | |||
212 | <script src="{{ static_url("base/js/events.js") }}" type="text/javascript" charset="utf-8"></script> |
|
212 | <script src="{{ static_url("base/js/events.js") }}" type="text/javascript" charset="utf-8"></script> | |
213 | <script src="{{ static_url("base/js/utils.js") }}" type="text/javascript" charset="utf-8"></script> |
|
213 | <script src="{{ static_url("base/js/utils.js") }}" type="text/javascript" charset="utf-8"></script> | |
214 | <script src="{{ static_url("notebook/js/layoutmanager.js") }}" type="text/javascript" charset="utf-8"></script> |
|
214 | <script src="{{ static_url("notebook/js/layoutmanager.js") }}" type="text/javascript" charset="utf-8"></script> | |
215 | <script src="{{ static_url("notebook/js/mathjaxutils.js") }}" type="text/javascript" charset="utf-8"></script> |
|
215 | <script src="{{ static_url("notebook/js/mathjaxutils.js") }}" type="text/javascript" charset="utf-8"></script> | |
216 | <script src="{{ static_url("notebook/js/outputarea.js") }}" type="text/javascript" charset="utf-8"></script> |
|
216 | <script src="{{ static_url("notebook/js/outputarea.js") }}" type="text/javascript" charset="utf-8"></script> | |
217 | <script src="{{ static_url("notebook/js/cell.js") }}" type="text/javascript" charset="utf-8"></script> |
|
217 | <script src="{{ static_url("notebook/js/cell.js") }}" type="text/javascript" charset="utf-8"></script> | |
218 | <script src="{{ static_url("notebook/js/celltoolbar.js") }}" type="text/javascript" charset="utf-8"></script> |
|
218 | <script src="{{ static_url("notebook/js/celltoolbar.js") }}" type="text/javascript" charset="utf-8"></script> | |
219 | <script src="{{ static_url("notebook/js/codecell.js") }}" type="text/javascript" charset="utf-8"></script> |
|
219 | <script src="{{ static_url("notebook/js/codecell.js") }}" type="text/javascript" charset="utf-8"></script> | |
220 | <script src="{{ static_url("notebook/js/completer.js") }}" type="text/javascript" charset="utf-8"></script> |
|
220 | <script src="{{ static_url("notebook/js/completer.js") }}" type="text/javascript" charset="utf-8"></script> | |
221 | <script src="{{ static_url("notebook/js/textcell.js") }}" type="text/javascript" charset="utf-8"></script> |
|
221 | <script src="{{ static_url("notebook/js/textcell.js") }}" type="text/javascript" charset="utf-8"></script> | |
222 | <script src="{{ static_url("services/kernels/js/kernel.js") }}" type="text/javascript" charset="utf-8"></script> |
|
222 | <script src="{{ static_url("services/kernels/js/kernel.js") }}" type="text/javascript" charset="utf-8"></script> | |
223 | <script src="{{ static_url("notebook/js/savewidget.js") }}" type="text/javascript" charset="utf-8"></script> |
|
223 | <script src="{{ static_url("notebook/js/savewidget.js") }}" type="text/javascript" charset="utf-8"></script> | |
224 | <script src="{{ static_url("notebook/js/quickhelp.js") }}" type="text/javascript" charset="utf-8"></script> |
|
224 | <script src="{{ static_url("notebook/js/quickhelp.js") }}" type="text/javascript" charset="utf-8"></script> | |
225 | <script src="{{ static_url("notebook/js/pager.js") }}" type="text/javascript" charset="utf-8"></script> |
|
225 | <script src="{{ static_url("notebook/js/pager.js") }}" type="text/javascript" charset="utf-8"></script> | |
226 | <script src="{{ static_url("notebook/js/menubar.js") }}" type="text/javascript" charset="utf-8"></script> |
|
226 | <script src="{{ static_url("notebook/js/menubar.js") }}" type="text/javascript" charset="utf-8"></script> | |
227 | <script src="{{ static_url("notebook/js/toolbar.js") }}" type="text/javascript" charset="utf-8"></script> |
|
227 | <script src="{{ static_url("notebook/js/toolbar.js") }}" type="text/javascript" charset="utf-8"></script> | |
228 | <script src="{{ static_url("notebook/js/maintoolbar.js") }}" type="text/javascript" charset="utf-8"></script> |
|
228 | <script src="{{ static_url("notebook/js/maintoolbar.js") }}" type="text/javascript" charset="utf-8"></script> | |
229 | <script src="{{ static_url("notebook/js/notebook.js") }}" type="text/javascript" charset="utf-8"></script> |
|
229 | <script src="{{ static_url("notebook/js/notebook.js") }}" type="text/javascript" charset="utf-8"></script> | |
230 | <script src="{{ static_url("notebook/js/notificationwidget.js") }}" type="text/javascript" charset="utf-8"></script> |
|
230 | <script src="{{ static_url("notebook/js/notificationwidget.js") }}" type="text/javascript" charset="utf-8"></script> | |
231 | <script src="{{ static_url("notebook/js/notificationarea.js") }}" type="text/javascript" charset="utf-8"></script> |
|
231 | <script src="{{ static_url("notebook/js/notificationarea.js") }}" type="text/javascript" charset="utf-8"></script> | |
232 | <script src="{{ static_url("notebook/js/tooltip.js") }}" type="text/javascript" charset="utf-8"></script> |
|
232 | <script src="{{ static_url("notebook/js/tooltip.js") }}" type="text/javascript" charset="utf-8"></script> | |
|
233 | <script src="{{ static_url("notebook/js/config.js") }}" type="text/javascript" charset="utf-8"></script> | |||
233 | <script src="{{ static_url("notebook/js/main.js") }}" type="text/javascript" charset="utf-8"></script> |
|
234 | <script src="{{ static_url("notebook/js/main.js") }}" type="text/javascript" charset="utf-8"></script> | |
234 |
|
235 | |||
235 | <script src="{{ static_url("notebook/js/contexthint.js") }}" charset="utf-8"></script> |
|
236 | <script src="{{ static_url("notebook/js/contexthint.js") }}" charset="utf-8"></script> | |
236 |
|
237 | |||
237 | <script src="{{ static_url("notebook/js/celltoolbarpresets/default.js") }}" type="text/javascript" charset="utf-8"></script> |
|
238 | <script src="{{ static_url("notebook/js/celltoolbarpresets/default.js") }}" type="text/javascript" charset="utf-8"></script> | |
238 | <script src="{{ static_url("notebook/js/celltoolbarpresets/slideshow.js") }}" type="text/javascript" charset="utf-8"></script> |
|
239 | <script src="{{ static_url("notebook/js/celltoolbarpresets/slideshow.js") }}" type="text/javascript" charset="utf-8"></script> | |
239 |
|
240 | |||
240 | {% endblock %} |
|
241 | {% endblock %} |
General Comments 0
You need to be logged in to leave comments.
Login now