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