summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2017-03-16 07:56:51 +0100
committerGitHub <noreply@github.com>2017-03-16 07:56:51 +0100
commit4d207680f28f789a0b83fabb3967fa02fccdb919 (patch)
tree5054cf2353300beae7c27da19223fceebe0dd652 /core
parent2fafdb39ac75e752bfcbfcfcc51fcbb86067c9fa (diff)
parent1a3617cdd6e370e2dc3f31fe6fe59e9e8b7fbc1c (diff)
downloadnextcloud-server-4d207680f28f789a0b83fabb3967fa02fccdb919.tar.gz
nextcloud-server-4d207680f28f789a0b83fabb3967fa02fccdb919.zip
Merge pull request #3624 from marncz/master
Update.js: countdown feedback before redirect
Diffstat (limited to 'core')
-rw-r--r--core/js/update.js17
1 files changed, 15 insertions, 2 deletions
diff --git a/core/js/update.js b/core/js/update.js
index e849d8a16ce..cd5ee8b0801 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(
@@ -97,9 +97,16 @@
);
} 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 id="redirect-countdown"></p>')
);
+
+ for(var i = 0; i <= 4; i++){
+ self.updateCountdown(i, 4);
+ }
+
setTimeout(function () {
OC.redirect(OC.webroot + '/');
}, 3000);
@@ -107,6 +114,12 @@
});
},
+ updateCountdown: function (i, total) {
+ setTimeout(function(){
+ $("#redirect-countdown").text(n('core', 'The update was successful. Redirecting you to Nextcloud in %n second.', 'The update was successful. Redirecting you to Nextcloud in %n seconds.', i));
+ }, (total - i) * 1000);
+ },
+
setMessage: function(message) {
$('#update-progress-message').html(message);
$('#update-progress-detailed')