Show More
@@ -5,13 +5,12 define([ | |||
|
5 | 5 | 'base/js/namespace', |
|
6 | 6 | 'jquery', |
|
7 | 7 | 'base/js/utils', |
|
8 | 'notebook/js/tooltip', | |
|
9 | 8 | 'base/js/keyboard', |
|
10 | 9 | 'notebook/js/cell', |
|
11 | 10 | 'notebook/js/outputarea', |
|
12 | 11 | 'notebook/js/completer', |
|
13 | 12 | 'notebook/js/celltoolbar', |
|
14 |
], function(IPython, $, utils |
|
|
13 | ], function(IPython, $, utils, keyboard, cell, outputarea, completer, celltoolbar) { | |
|
15 | 14 | "use strict"; |
|
16 | 15 | var Cell = cell.Cell; |
|
17 | 16 | |
@@ -56,11 +55,12 define([ | |||
|
56 | 55 | // config: dictionary |
|
57 | 56 | // keyboard_manager: KeyboardManager instance |
|
58 | 57 | // notebook: Notebook instance |
|
58 | // tooltip: Tooltip instance | |
|
59 | 59 | this.kernel = kernel || null; |
|
60 | 60 | this.notebook = options.notebook; |
|
61 | 61 | this.collapsed = false; |
|
62 | 62 | this.events = options.events; |
|
63 |
this.tooltip = |
|
|
63 | this.tooltip = options.tooltip; | |
|
64 | 64 | this.config = options.config; |
|
65 | 65 | |
|
66 | 66 | // create all attributed in constructor function |
@@ -132,4 +132,5 require([ | |||
|
132 | 132 | IPython.keyboard_manager = keyboard_manager; |
|
133 | 133 | IPython.save_widget = save_widget; |
|
134 | 134 | IPython.config = user_config; |
|
135 | IPython.tooltip = notebook.tooltip; | |
|
135 | 136 | }); |
@@ -13,6 +13,7 define([ | |||
|
13 | 13 | 'components/marked/lib/marked', |
|
14 | 14 | 'notebook/js/mathjaxutils', |
|
15 | 15 | 'base/js/keyboard', |
|
16 | 'notebook/js/tooltip', | |
|
16 | 17 | ], function ( |
|
17 | 18 | IPython, |
|
18 | 19 | $, |
@@ -24,7 +25,8 define([ | |||
|
24 | 25 | celltoolbar, |
|
25 | 26 | marked, |
|
26 | 27 | mathjaxutils, |
|
27 | keyboard | |
|
28 | keyboard, | |
|
29 | tooltip | |
|
28 | 30 | ) { |
|
29 | 31 | |
|
30 | 32 | var Notebook = function (selector, options) { |
@@ -50,6 +52,7 define([ | |||
|
50 | 52 | this.events = options.events; |
|
51 | 53 | this.keyboard_manager = options.keyboard_manager; |
|
52 | 54 | this.save_widget = options.save_widget; |
|
55 | this.tooltip = tooltip.Tooltip(this.events); | |
|
53 | 56 | // TODO: This code smells (and the other `= this` line a couple lines down) |
|
54 | 57 | // We need a better way to deal with circular instance references. |
|
55 | 58 | this.keyboard_manager.notebook = this; |
@@ -815,7 +818,8 define([ | |||
|
815 | 818 | events: this.events, |
|
816 | 819 | config: this.config, |
|
817 | 820 | keyboard_manager: this.keyboard_manager, |
|
818 | notebook: this | |
|
821 | notebook: this, | |
|
822 | tooltip: this.tooltip, | |
|
819 | 823 | }; |
|
820 | 824 | if (type === 'code') { |
|
821 | 825 | cell = new codecell.CodeCell(this.kernel, cell_options); |
@@ -3,7 +3,7 | |||
|
3 | 3 | |
|
4 | 4 | define([ |
|
5 | 5 | 'base/js/namespace', |
|
6 | 'jquery', | |
|
6 | 'jqueryui', | |
|
7 | 7 | 'base/js/utils', |
|
8 | 8 | 'base/js/security', |
|
9 | 9 | 'base/js/keyboard', |
@@ -3,7 +3,7 | |||
|
3 | 3 | |
|
4 | 4 | define([ |
|
5 | 5 | 'base/js/namespace', |
|
6 | 'jquery', | |
|
6 | 'jqueryui', | |
|
7 | 7 | 'base/js/utils', |
|
8 | 8 | ], function(IPython, $, utils) { |
|
9 | 9 | "use strict"; |
@@ -3,7 +3,8 | |||
|
3 | 3 | |
|
4 | 4 | define([ |
|
5 | 5 | "widgets/js/widget", |
|
6 | ], function(widget){ | |
|
6 | "jqueryui" | |
|
7 | ], function(widget, $){ | |
|
7 | 8 | |
|
8 | 9 | var ContainerView = widget.DOMWidgetView.extend({ |
|
9 | 10 | render: function(){ |
@@ -25,6 +25,7 | |||
|
25 | 25 | jquery: 'components/jquery/jquery.min', |
|
26 | 26 | bootstraptour: 'components/bootstrap-tour/build/js/bootstrap-tour.min', |
|
27 | 27 | dateformat: 'dateformat/date.format', |
|
28 | jqueryui: 'components/jquery-ui/ui/minified/jquery-ui.min', | |
|
28 | 29 | }, |
|
29 | 30 | shim: { |
|
30 | 31 | underscore: { |
@@ -39,6 +40,10 | |||
|
39 | 40 | }, |
|
40 | 41 | dateformat: { |
|
41 | 42 | exports: "dateFormat" |
|
43 | }, | |
|
44 | jqueryui: { | |
|
45 | deps: ["jquery"], | |
|
46 | exports: "$" | |
|
42 | 47 | } |
|
43 | 48 | } |
|
44 | 49 | }); |
@@ -11,10 +11,10 casper.notebook_test(function () { | |||
|
11 | 11 | this.evaluate(function (nbname) { |
|
12 | 12 | IPython.notebook.notebook_name = nbname; |
|
13 | 13 | IPython._save_success = IPython._save_failed = false; |
|
14 |
|
|
|
14 | IPython.events.on('notebook_saved.Notebook', function () { | |
|
15 | 15 | IPython._save_success = true; |
|
16 | 16 | }); |
|
17 |
|
|
|
17 | IPython.events.on('notebook_save_failed.Notebook', | |
|
18 | 18 | function (event, xhr, status, error) { |
|
19 | 19 | IPython._save_failed = "save failed with " + xhr.status + xhr.responseText; |
|
20 | 20 | }); |
@@ -41,7 +41,7 casper.notebook_test(function () { | |||
|
41 | 41 | }); |
|
42 | 42 | |
|
43 | 43 | this.thenEvaluate(function(){ |
|
44 |
|
|
|
44 | IPython.events.on('checkpoint_created.Notebook', function (evt, data) { | |
|
45 | 45 | IPython._checkpoint_created = true; |
|
46 | 46 | }); |
|
47 | 47 | IPython._checkpoint_created = false; |
General Comments 0
You need to be logged in to leave comments.
Login now