##// END OF EJS Templates
Only show shutdown when notebooks are the only thing selected.
Jonathan Frederic -
Show More
@@ -333,6 +333,7 b' define(['
333 333 var selected = [];
334 334 var has_running_notebook = false;
335 335 var has_directory = false;
336 var has_file = false;
336 337 var that = this;
337 338 $('.list_item :checked').each(function(index, item) {
338 339 var parent = $(item).parent().parent();
@@ -344,6 +345,7 b' define(['
344 345
345 346 has_running_notebook = has_running_notebook ||
346 347 (parent.data('type') == 'notebook' && that.sessions[parent.data('path')] !== undefined);
348 has_file = has_file || parent.data('type') == 'file';
347 349 has_directory = has_directory || parent.data('type') == 'directory';
348 350 });
349 351 this.selected = selected;
@@ -356,7 +358,7 b' define(['
356 358 }
357 359
358 360 // Shutdown is only visible when one or more notebooks are visible.
359 if (has_running_notebook) {
361 if (has_running_notebook && !(has_file || has_directory)) {
360 362 $('.shutdown-button').css('display', 'inline-block');
361 363 } else {
362 364 $('.shutdown-button').css('display', 'none');
General Comments 0
You need to be logged in to leave comments. Login now