##// END OF EJS Templates
Merge pull request #5332 from ivanov/semantic-icons...
Min RK -
r15863:13b5ba90 merge
parent child Browse files
Show More
@@ -44,21 +44,21 b' 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,23 +75,26 b' 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','icon-pencil').attr('title','Edit Mode');
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','').attr('title','Command Mode');
83 $modal_ind_icon.attr('class','command_mode_icon').attr('title','Command Mode');
84 84 });
85 85
86 // Implicitly start off in Command mode, switching to Edit mode will trigger event
87 $modal_ind_icon.attr('class','command-mode_icon').attr('title','Command Mode');
88
86 89 // Kernel events
87 90 $([IPython.events]).on('status_idle.Kernel',function () {
88 91 IPython.save_widget.update_document_title();
89 $kernel_ind_icon.attr('class','icon-circle-blank').attr('title','Kernel Idle');
92 $kernel_ind_icon.attr('class','kernel_idle_icon').attr('title','Kernel Idle');
90 93 });
91 94
92 95 $([IPython.events]).on('status_busy.Kernel',function () {
93 96 window.document.title='(Busy) '+window.document.title;
94 $kernel_ind_icon.attr('class','icon-circle').attr('title','Kernel Busy');
97 $kernel_ind_icon.attr('class','kernel_busy_icon').attr('title','Kernel Busy');
95 98 });
96 99
97 100 $([IPython.events]).on('status_restarting.Kernel',function () {
@@ -105,7 +108,7 b' var IPython = (function (IPython) {'
105 108
106 109 // Start the kernel indicator in the busy state, and send a kernel_info request.
107 110 // When the kernel_info reply arrives, the kernel is idle.
108 $kernel_ind_icon.attr('class','icon-circle').attr('title','Kernel Busy');
111 $kernel_ind_icon.attr('class','kernel_busy_icon').attr('title','Kernel Busy');
109 112
110 113 $([IPython.events]).on('status_started.Kernel', function (evt, data) {
111 114 data.kernel.kernel_info(function () {
@@ -148,7 +151,7 b' var IPython = (function (IPython) {'
148 151 }, 5000);
149 152 return;
150 153 }
151 console.log('WebSocket connection failed: ', ws_url)
154 console.log('WebSocket connection failed: ', ws_url);
152 155 msg = "A WebSocket connection could not be established." +
153 156 " You will NOT be able to run code. Check your" +
154 157 " network connection or notebook server configuration.";
@@ -16,3 +16,20 b''
16 16 margin-right: -16px;
17 17 }
18 18
19 .edit_mode_icon:before {
20 .icon(@pencil);
21 }
22
23 .command_mode_icon:before {
24 .icon(' ');
25 }
26
27 .kernel_idle_icon:before {
28 .icon(@circle-blank);
29 }
30
31 .kernel_busy_icon:before {
32 .icon(@circle);
33 }
34
35
@@ -1506,6 +1506,10 b' ul#help_menu li a{overflow:hidden;padding-right:2.2em}ul#help_menu li a i{margin'
1506 1506 #notification_area{z-index:10}
1507 1507 .indicator_area{color:#777;padding:4px 3px;margin:0;width:11px;z-index:10;text-align:center}
1508 1508 #kernel_indicator{margin-right:-16px}
1509 .edit_mode_icon:before{font-family:FontAwesome;font-weight:normal;font-style:normal;text-decoration:inherit;-webkit-font-smoothing:antialiased;*margin-right:.3em;content:"\f040"}
1510 .command_mode_icon:before{font-family:FontAwesome;font-weight:normal;font-style:normal;text-decoration:inherit;-webkit-font-smoothing:antialiased;*margin-right:.3em;content:' '}
1511 .kernel_idle_icon:before{font-family:FontAwesome;font-weight:normal;font-style:normal;text-decoration:inherit;-webkit-font-smoothing:antialiased;*margin-right:.3em;content:"\f10c"}
1512 .kernel_busy_icon:before{font-family:FontAwesome;font-weight:normal;font-style:normal;text-decoration:inherit;-webkit-font-smoothing:antialiased;*margin-right:.3em;content:"\f111"}
1509 1513 .notification_widget{color:#777;padding:1px 12px;margin:2px 4px;z-index:10;border:1px solid #ccc;border-radius:4px;background:rgba(240,240,240,0.5)}.notification_widget.span{padding-right:2px}
1510 1514 div#pager_splitter{height:8px}
1511 1515 #pager-container{position:relative;padding:15px 0}
General Comments 0
You need to be logged in to leave comments. Login now