Fix upgrade stdout handling if file doesn't exist yet

plus some other tweaks..
This commit is contained in:
Lance Edgar 2017-08-09 11:56:25 -05:00
parent e5b0fe7198
commit 773a0c769d
3 changed files with 19 additions and 12 deletions

View file

@ -12,11 +12,13 @@
location.href = '${cancel_url}';
} else {
var stdout = $('.stdout');
var height = $(window).height() - stdout.offset().top - 50;
stdout.height(height);
stdout.append(data.stdout);
stdout.animate({scrollTop: stdout.get(0).scrollHeight - height}, 250);
if (data.stdout) {
var stdout = $('.stdout');
var height = $(window).height() - stdout.offset().top - 50;
stdout.height(height);
stdout.append(data.stdout);
stdout.animate({scrollTop: stdout.get(0).scrollHeight - height}, 250);
}
if (data.complete || data.maximum) {
$('#message').html(data.message);