Show More
@@ -329,7 +329,7 b' define([' | |||||
329 |
|
329 | |||
330 | NotebookList.prototype._selection_changed = function() { |
|
330 | NotebookList.prototype._selection_changed = function() { | |
331 | var selected = []; |
|
331 | var selected = []; | |
332 | var has_notebook = false; |
|
332 | var has_running_notebook = false; | |
333 | var has_directory = false; |
|
333 | var has_directory = false; | |
334 | $('.list_item :checked').each(function(index, item) { |
|
334 | $('.list_item :checked').each(function(index, item) { | |
335 | var parent = $(item).parent().parent(); |
|
335 | var parent = $(item).parent().parent(); | |
@@ -339,7 +339,8 b' define([' | |||||
339 | type: parent.data('type') |
|
339 | type: parent.data('type') | |
340 | }); |
|
340 | }); | |
341 |
|
341 | |||
342 |
has_notebook = has_notebook || |
|
342 | has_running_notebook = has_running_notebook || | |
|
343 | (parent.data('type') == 'notebook' && that.sessions[parent.data('path')] !== undefined); | |||
343 | has_directory = has_directory || parent.data('type') == 'directory'; |
|
344 | has_directory = has_directory || parent.data('type') == 'directory'; | |
344 | }); |
|
345 | }); | |
345 | this.selected = selected; |
|
346 | this.selected = selected; | |
@@ -352,7 +353,7 b' define([' | |||||
352 | } |
|
353 | } | |
353 |
|
354 | |||
354 | // Shutdown is only visible when one or more notebooks are visible. |
|
355 | // Shutdown is only visible when one or more notebooks are visible. | |
355 | if (has_notebook) { |
|
356 | if (has_running_notebook) { | |
356 | $('.shutdown-button').css('display', 'inline-block'); |
|
357 | $('.shutdown-button').css('display', 'inline-block'); | |
357 | } else { |
|
358 | } else { | |
358 | $('.shutdown-button').css('display', 'none'); |
|
359 | $('.shutdown-button').css('display', 'none'); |
General Comments 0
You need to be logged in to leave comments.
Login now