diff options
author | Vincent Petry <pvince81@owncloud.com> | 2015-10-13 17:34:13 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-10-20 13:28:48 +0200 |
commit | 06ddd4088635e47f4fe08b26e8b8a41c9786bc92 (patch) | |
tree | 99726fc2efecf54903415ab454e48b8e99932be2 /core/js/update.js | |
parent | 64dc222ce58524225f164caf3f48b5c1ef39f025 (diff) | |
download | nextcloud-server-06ddd4088635e47f4fe08b26e8b8a41c9786bc92.tar.gz nextcloud-server-06ddd4088635e47f4fe08b26e8b8a41c9786bc92.zip |
Prevent leaving the DB update page while in progress
Diffstat (limited to 'core/js/update.js')
-rw-r--r-- | core/js/update.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/core/js/update.js b/core/js/update.js index bc8df0e20c0..7cf9b558c22 100644 --- a/core/js/update.js +++ b/core/js/update.js @@ -27,6 +27,11 @@ this.$el = $el; 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( 'core', 'Updating {productName} to version {version}, this may take a while.', { @@ -61,6 +66,8 @@ .appendTo($el); }); updateEventSource.listen('done', function() { + $(window).off('beforeunload.inprogress'); + if (hasWarnings) { $('<span>').addClass('bold') .append('<br />') |