add running indication for notebook icon in dashboard

This commit is contained in:
Mathieu 2015-01-28 16:01:09 +01:00
parent 03ffca6d88
commit a9201807a9
3 changed files with 28 additions and 1 deletions

View File

@ -8794,6 +8794,23 @@ input.engine_num_input {
.notebook_icon:before.pull-right {
margin-left: .3em;
}
.running_notebook_icon:before {
display: inline-block;
font: normal normal normal 14px/1 FontAwesome;
font-size: inherit;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
transform: translate(0, 0);
content: "\f02d";
color: #5cb85c;
}
.running_notebook_icon:before.pull-left {
margin-right: .3em;
}
.running_notebook_icon:before.pull-right {
margin-left: .3em;
}
.file_icon:before {
display: inline-block;
font: normal normal normal 14px/1 FontAwesome;

View File

@ -382,11 +382,16 @@ define([
NotebookList.prototype.add_link = function (model, item) {
var path = model.path,
name = model.name;
var running = (model.type == 'notebook' && this.sessions[path] !== undefined);
item.data('name', name);
item.data('path', path);
item.data('type', model.type);
item.find(".item_name").text(name);
var icon = NotebookList.icons[model.type];
if (running) {
icon = 'running_' + icon;
}
var uri_prefix = NotebookList.uri_prefixes[model.type];
item.find(".item_icon").addClass(icon).addClass('icon-fixed-width');
var link = item.find("a.item_link")
@ -398,7 +403,6 @@ define([
)
);
var running = (model.type == 'notebook' && this.sessions[path] !== undefined);
item.find(".item_buttons .running-indicator").css('visibility', running ? '' : 'hidden');
// directory nav doesn't open new tabs

View File

@ -164,6 +164,12 @@ input.engine_num_input {
.icon(@fa-var-book)
}
.running_notebook_icon:before {
.icon(@fa-var-book);
color: @brand-success
}
.file_icon:before {
.icon(@fa-var-file-o)
}