##// END OF EJS Templates
add running indication for notebook icon in dashboard
Mathieu -
Show More
@@ -8794,6 +8794,23 b' input.engine_num_input {'
8794 .notebook_icon:before.pull-right {
8794 .notebook_icon:before.pull-right {
8795 margin-left: .3em;
8795 margin-left: .3em;
8796 }
8796 }
8797 .running_notebook_icon:before {
8798 display: inline-block;
8799 font: normal normal normal 14px/1 FontAwesome;
8800 font-size: inherit;
8801 text-rendering: auto;
8802 -webkit-font-smoothing: antialiased;
8803 -moz-osx-font-smoothing: grayscale;
8804 transform: translate(0, 0);
8805 content: "\f02d";
8806 color: #5cb85c;
8807 }
8808 .running_notebook_icon:before.pull-left {
8809 margin-right: .3em;
8810 }
8811 .running_notebook_icon:before.pull-right {
8812 margin-left: .3em;
8813 }
8797 .file_icon:before {
8814 .file_icon:before {
8798 display: inline-block;
8815 display: inline-block;
8799 font: normal normal normal 14px/1 FontAwesome;
8816 font: normal normal normal 14px/1 FontAwesome;
@@ -382,11 +382,16 b' define(['
382 NotebookList.prototype.add_link = function (model, item) {
382 NotebookList.prototype.add_link = function (model, item) {
383 var path = model.path,
383 var path = model.path,
384 name = model.name;
384 name = model.name;
385 var running = (model.type == 'notebook' && this.sessions[path] !== undefined);
386
385 item.data('name', name);
387 item.data('name', name);
386 item.data('path', path);
388 item.data('path', path);
387 item.data('type', model.type);
389 item.data('type', model.type);
388 item.find(".item_name").text(name);
390 item.find(".item_name").text(name);
389 var icon = NotebookList.icons[model.type];
391 var icon = NotebookList.icons[model.type];
392 if (running) {
393 icon = 'running_' + icon;
394 }
390 var uri_prefix = NotebookList.uri_prefixes[model.type];
395 var uri_prefix = NotebookList.uri_prefixes[model.type];
391 item.find(".item_icon").addClass(icon).addClass('icon-fixed-width');
396 item.find(".item_icon").addClass(icon).addClass('icon-fixed-width');
392 var link = item.find("a.item_link")
397 var link = item.find("a.item_link")
@@ -398,7 +403,6 b' define(['
398 )
403 )
399 );
404 );
400
405
401 var running = (model.type == 'notebook' && this.sessions[path] !== undefined);
402 item.find(".item_buttons .running-indicator").css('visibility', running ? '' : 'hidden');
406 item.find(".item_buttons .running-indicator").css('visibility', running ? '' : 'hidden');
403
407
404 // directory nav doesn't open new tabs
408 // directory nav doesn't open new tabs
@@ -164,6 +164,12 b' input.engine_num_input {'
164 .icon(@fa-var-book)
164 .icon(@fa-var-book)
165 }
165 }
166
166
167 .running_notebook_icon:before {
168 .icon(@fa-var-book);
169 color: @brand-success
170 }
171
172
167 .file_icon:before {
173 .file_icon:before {
168 .icon(@fa-var-file-o)
174 .icon(@fa-var-file-o)
169 }
175 }
General Comments 0
You need to be logged in to leave comments. Login now