Browse Source

Prevent leaving the DB update page while in progress

tags/v9.0beta1
Vincent Petry 8 years ago
parent
commit
06ddd40886
1 changed files with 7 additions and 0 deletions
  1. 7
    0
      core/js/update.js

+ 7
- 0
core/js/update.js View File

this.$el = $el; this.$el = $el;


this._started = true; this._started = true;

$(window).on('beforeunload.inprogress', function () {
return t('core', 'The upgrade is in progress, leaving this page might interrupt the process in some environments.');
});

this.addMessage(t( this.addMessage(t(
'core', 'core',
'Updating {productName} to version {version}, this may take a while.', { 'Updating {productName} to version {version}, this may take a while.', {
.appendTo($el); .appendTo($el);
}); });
updateEventSource.listen('done', function() { updateEventSource.listen('done', function() {
$(window).off('beforeunload.inprogress');

if (hasWarnings) { if (hasWarnings) {
$('<span>').addClass('bold') $('<span>').addClass('bold')
.append('<br />') .append('<br />')

Loading…
Cancel
Save