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:
parent
78b09cacd0
commit
646956dfdb
|
@ -63,7 +63,9 @@
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '${url('progress', key=key)}',
|
url: '${url('progress', key=key)}',
|
||||||
success: function(data) {
|
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);
|
$('#message').html(data.message);
|
||||||
$('#total').html('('+data.maximum+' total)');
|
$('#total').html('('+data.maximum+' total)');
|
||||||
$('#cancel button').show();
|
$('#cancel button').show();
|
||||||
|
@ -84,8 +86,6 @@
|
||||||
}
|
}
|
||||||
$('#percentage').html(width+'%');
|
$('#percentage').html(width+'%');
|
||||||
}
|
}
|
||||||
} else if (data.error) {
|
|
||||||
location.href = '${cancel_url}';
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue