Check for output prior printing
This commit is contained in:
@ -41,6 +41,7 @@ $(document).on('turbolinks:load', function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
var printOutput = function (output) {
|
var printOutput = function (output) {
|
||||||
|
if (output) {
|
||||||
var element = $('<p>');
|
var element = $('<p>');
|
||||||
if (output.stderr) {
|
if (output.stderr) {
|
||||||
element.addClass('text-warning');
|
element.addClass('text-warning');
|
||||||
@ -53,6 +54,7 @@ $(document).on('turbolinks:load', function() {
|
|||||||
element.html($('#output').data('message-no-output'));
|
element.html($('#output').data('message-no-output'));
|
||||||
}
|
}
|
||||||
$('#output').append(element);
|
$('#output').append(element);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var printTimeout = function (output) {
|
var printTimeout = function (output) {
|
||||||
@ -66,4 +68,5 @@ $(document).on('turbolinks:load', function() {
|
|||||||
$('#command').focus();
|
$('#command').focus();
|
||||||
$('#command').on('keypress', handleKeyPress);
|
$('#command').on('keypress', handleKeyPress);
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
|
;
|
||||||
|
Reference in New Issue
Block a user