diff options
author | Marcin Czarnecki <M.Czarnecki1@uni.brighton.ac.uk> | 2017-02-25 19:16:22 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-25 19:16:22 +0000 |
commit | 9f1fbc2c988319af21796d959098a7f75bd1d46c (patch) | |
tree | 3e8795ef066b4e244f18ac5441f559f1d2821b02 /core | |
parent | 556b958af2e786eefc6c7a1423510c0ff7aabfcf (diff) | |
download | nextcloud-server-9f1fbc2c988319af21796d959098a7f75bd1d46c.tar.gz nextcloud-server-9f1fbc2c988319af21796d959098a7f75bd1d46c.zip |
Update: feedback before redirect
Signed-off-by: marncz <M.Czarnecki1@uni.brighton.ac.uk>
Diffstat (limited to 'core')
-rw-r--r-- | core/js/update.js | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/core/js/update.js b/core/js/update.js index e849d8a16ce..cc2b20f5c99 100644 --- a/core/js/update.js +++ b/core/js/update.js @@ -87,7 +87,7 @@ $('#update-progress-icon') .addClass('icon-checkmark-white') - .removeClass('icon-loading-dark'); + .removeClass('icon-loading-dark'); if (hasWarnings) { $el.find('.update-show-detailed').before( @@ -98,8 +98,13 @@ } else { // FIXME: use product name $el.find('.update-show-detailed').before( - $('<p>'+t('core', 'The update was successful. Redirecting you to Nextcloud now.')+'</p>') + $('<p>'+t('core', 'The update was successful. Redirecting you to Nextcloud in ')+'<span id="countdown"></span></p>') ); + + for(var i = 4; i >= 0; i--) { + self.updateCountdown(i); + } + setTimeout(function () { OC.redirect(OC.webroot + '/'); }, 3000); @@ -107,6 +112,13 @@ }); }, + updateCountdown: function (i) { + setTimeout(function(){ + $("#countdown").html(i + " second"); + if(i > 1) { $("#countdown").append("s"); } + }, (4 - i) * 1000); + }, + setMessage: function(message) { $('#update-progress-message').html(message); $('#update-progress-detailed') |