Fix bug with progress template, when error occurs (?).

Not real clear about why this problem existed.  Hopefully this "fix" comes
with no side effects...
This commit is contained in:
Lance Edgar 2014-12-17 14:51:13 -06:00
parent 78b09cacd0
commit 646956dfdb

View file

@ -63,7 +63,9 @@
$.ajax({
url: '${url('progress', key=key)}',
success: function(data) {
if (data.complete || data.maximum) {
if (data.error) {
location.href = '${cancel_url}';
} else if (data.complete || data.maximum) {
$('#message').html(data.message);
$('#total').html('('+data.maximum+' total)');
$('#cancel button').show();
@ -84,8 +86,6 @@
}
$('#percentage').html(width+'%');
}
} else if (data.error) {
location.href = '${cancel_url}';
}
},
});