Skip to content

Commit

Permalink
Set the progressbar to undefined when an error occurred
Browse files Browse the repository at this point in the history
  • Loading branch information
michitux committed Mar 31, 2013
1 parent e1d9483 commit 68f1b01
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,12 @@ jQuery(function() {
skip: skip
},
function(data) {
$progressbar.progressbar('option', 'value', data.pages + data.media - data.remaining);
$progressbar.progressbar('option', 'max', data.pages + data.media);
if (data.remaining === false) {
$progressbar.progressbar('option', 'value', false);
} else {
$progressbar.progressbar('option', 'value', data.pages + data.media - data.remaining);
$progressbar.progressbar('option', 'max', data.pages + data.media);
}
$message.html(data.html);
if (data.remaining === false) {
$container.find('form.pagemove__nscontinue, form.pagemove__nsskip').submit(submit_handler);
Expand Down

0 comments on commit 68f1b01

Please sign in to comment.