added button state for files which no actions are available for
This commit is contained in:
@@ -156,6 +156,10 @@ $(function() {
|
||||
jqxhr.fail(ajaxError);
|
||||
};
|
||||
|
||||
var fileActionsAvailable = function() {
|
||||
return isActiveFileRenderable() || isActiveFileRunnable() || isActiveFileStoppable() || isActiveFileTestable();
|
||||
};
|
||||
|
||||
var findOrCreateOutputElement = function(index) {
|
||||
if ($('#output-' + index).isPresent()) {
|
||||
return $('#output-' + index);
|
||||
@@ -644,6 +648,8 @@ $(function() {
|
||||
$('#dropdown-run').toggleClass('disabled', !isActiveFileRunnable() || running);
|
||||
$('#dropdown-stop').toggleClass('disabled', !isActiveFileStoppable());
|
||||
$('#dropdown-test').toggleClass('disabled', !isActiveFileTestable());
|
||||
$('#dummy').toggle(!fileActionsAvailable());
|
||||
$('#editor-buttons .dropdown-toggle').toggle(fileActionsAvailable());
|
||||
$('#render').toggle(isActiveFileRenderable());
|
||||
$('#run').toggle(isActiveFileRunnable() && !running);
|
||||
$('#stop').toggle(isActiveFileStoppable());
|
||||
|
@@ -24,6 +24,11 @@ button i.fa-spin {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#dummy {
|
||||
display: none;
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
#editor-buttons {
|
||||
background-color: #008CBA;
|
||||
margin-top: 1em;
|
||||
|
Reference in New Issue
Block a user