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