Show More
@@ -44,21 +44,21 var IPython = (function (IPython) { | |||
|
44 | 44 | }; |
|
45 | 45 | |
|
46 | 46 | NotificationArea.prototype.widget = function(name) { |
|
47 | if(this.widget_dict[name] == undefined) { | |
|
47 | if(this.widget_dict[name] === undefined) { | |
|
48 | 48 | return this.new_notification_widget(name); |
|
49 | 49 | } |
|
50 | 50 | return this.get_widget(name); |
|
51 | 51 | }; |
|
52 | 52 | |
|
53 | 53 | NotificationArea.prototype.get_widget = function(name) { |
|
54 | if(this.widget_dict[name] == undefined) { | |
|
54 | if(this.widget_dict[name] === undefined) { | |
|
55 | 55 | throw('no widgets with this name'); |
|
56 | 56 | } |
|
57 | 57 | return this.widget_dict[name]; |
|
58 | 58 | }; |
|
59 | 59 | |
|
60 | 60 | NotificationArea.prototype.new_notification_widget = function(name) { |
|
61 | if(this.widget_dict[name] != undefined) { | |
|
61 | if(this.widget_dict[name] !== undefined) { | |
|
62 | 62 | throw('widget with that name already exists ! '); |
|
63 | 63 | } |
|
64 | 64 | var div = $('<div/>').attr('id','notification_'+name); |
@@ -75,26 +75,26 var IPython = (function (IPython) { | |||
|
75 | 75 | // Command/Edit mode |
|
76 | 76 | $([IPython.events]).on('edit_mode.Notebook',function () { |
|
77 | 77 | IPython.save_widget.update_document_title(); |
|
78 |
$modal_ind_icon.attr('class',' |
|
|
78 | $modal_ind_icon.attr('class','edit_mode_icon').attr('title','Edit Mode'); | |
|
79 | 79 | }); |
|
80 | 80 | |
|
81 | 81 | $([IPython.events]).on('command_mode.Notebook',function () { |
|
82 | 82 | IPython.save_widget.update_document_title(); |
|
83 |
$modal_ind_icon.attr('class',' |
|
|
83 | $modal_ind_icon.attr('class','command_mode_icon').attr('title','Command Mode'); | |
|
84 | 84 | }); |
|
85 | 85 | |
|
86 | 86 | // Implicitly start off in Command mode, switching to Edit mode will trigger event |
|
87 |
$modal_ind_icon.attr('class',' |
|
|
87 | $modal_ind_icon.attr('class','command-mode_icon').attr('title','Command Mode'); | |
|
88 | 88 | |
|
89 | 89 | // Kernel events |
|
90 | 90 | $([IPython.events]).on('status_idle.Kernel',function () { |
|
91 | 91 | IPython.save_widget.update_document_title(); |
|
92 |
$kernel_ind_icon.attr('class',' |
|
|
92 | $kernel_ind_icon.attr('class','kernel_idle_icon').attr('title','Kernel Idle'); | |
|
93 | 93 | }); |
|
94 | 94 | |
|
95 | 95 | $([IPython.events]).on('status_busy.Kernel',function () { |
|
96 | 96 | window.document.title='(Busy) '+window.document.title; |
|
97 |
$kernel_ind_icon.attr('class',' |
|
|
97 | $kernel_ind_icon.attr('class','kernel_busy_icon').attr('title','Kernel Busy'); | |
|
98 | 98 | }); |
|
99 | 99 | |
|
100 | 100 | $([IPython.events]).on('status_restarting.Kernel',function () { |
@@ -108,7 +108,7 var IPython = (function (IPython) { | |||
|
108 | 108 | |
|
109 | 109 | // Start the kernel indicator in the busy state, and send a kernel_info request. |
|
110 | 110 | // When the kernel_info reply arrives, the kernel is idle. |
|
111 |
$kernel_ind_icon.attr('class',' |
|
|
111 | $kernel_ind_icon.attr('class','kernel_busy_icon').attr('title','Kernel Busy'); | |
|
112 | 112 | |
|
113 | 113 | $([IPython.events]).on('status_started.Kernel', function (evt, data) { |
|
114 | 114 | data.kernel.kernel_info(function () { |
@@ -151,7 +151,7 var IPython = (function (IPython) { | |||
|
151 | 151 | }, 5000); |
|
152 | 152 | return; |
|
153 | 153 | } |
|
154 | console.log('WebSocket connection failed: ', ws_url) | |
|
154 | console.log('WebSocket connection failed: ', ws_url); | |
|
155 | 155 | msg = "A WebSocket connection could not be established." + |
|
156 | 156 | " You will NOT be able to run code. Check your" + |
|
157 | 157 | " network connection or notebook server configuration."; |
@@ -16,19 +16,19 | |||
|
16 | 16 | margin-right: -16px; |
|
17 | 17 | } |
|
18 | 18 | |
|
19 |
. |
|
|
19 | .edit_mode_icon:before { | |
|
20 | 20 | .icon(@pencil); |
|
21 | 21 | } |
|
22 | 22 | |
|
23 |
. |
|
|
23 | .command_mode_icon:before { | |
|
24 | 24 | .icon(' '); |
|
25 | 25 | } |
|
26 | 26 | |
|
27 |
. |
|
|
27 | .kernel_idle_icon:before { | |
|
28 | 28 | .icon(@circle-blank); |
|
29 | 29 | } |
|
30 | 30 | |
|
31 |
. |
|
|
31 | .kernel_busy_icon:before { | |
|
32 | 32 | .icon(@circle); |
|
33 | 33 | } |
|
34 | 34 |
General Comments 0
You need to be logged in to leave comments.
Login now