Merge pull request #17436 from owncloud/update-keeppageifwarnings
Keep update page when there are warnings
This commit is contained in:
commit
10ea3f610d
1 changed files with 20 additions and 8 deletions
|
@ -22,6 +22,8 @@
|
|||
return;
|
||||
}
|
||||
|
||||
var hasWarnings = false;
|
||||
|
||||
this.$el = $el;
|
||||
|
||||
this._started = true;
|
||||
|
@ -40,6 +42,7 @@
|
|||
});
|
||||
updateEventSource.listen('notice', function(message) {
|
||||
$('<span>').addClass('error').append(message).append('<br />').appendTo($el);
|
||||
hasWarnings = true;
|
||||
});
|
||||
updateEventSource.listen('error', function(message) {
|
||||
$('<span>').addClass('error').append(message).append('<br />').appendTo($el);
|
||||
|
@ -57,14 +60,23 @@
|
|||
.appendTo($el);
|
||||
});
|
||||
updateEventSource.listen('done', function() {
|
||||
// FIXME: use product name
|
||||
$('<span>').addClass('bold')
|
||||
.append('<br />')
|
||||
.append(t('core', 'The update was successful. Redirecting you to ownCloud now.'))
|
||||
.appendTo($el);
|
||||
setTimeout(function () {
|
||||
OC.redirect(OC.webroot);
|
||||
}, 3000);
|
||||
if (hasWarnings) {
|
||||
$('<span>').addClass('bold')
|
||||
.append('<br />')
|
||||
.append(t('core', 'The update was successful. There were warnings.'))
|
||||
.appendTo($el);
|
||||
var message = t('core', 'Please reload the page.');
|
||||
$('<span>').append('<br />').append(message).append('<br />').appendTo($el);
|
||||
} else {
|
||||
// FIXME: use product name
|
||||
$('<span>').addClass('bold')
|
||||
.append('<br />')
|
||||
.append(t('core', 'The update was successful. Redirecting you to ownCloud now.'))
|
||||
.appendTo($el);
|
||||
setTimeout(function () {
|
||||
OC.redirect(OC.webroot);
|
||||
}, 3000);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue