diff options
author | Michael Gapczynski <mtgap@owncloud.com> | 2013-01-05 09:33:29 -0800 |
---|---|---|
committer | Michael Gapczynski <mtgap@owncloud.com> | 2013-01-05 09:33:29 -0800 |
commit | da7a14e9a6cc5a388ae817a226af7fa262fe6846 (patch) | |
tree | 32901cc0472166121c1f1a99c78c41dbb4a7d232 /core/templates | |
parent | 0c6213a371059952bc2393563ad93ca74fbdddfc (diff) | |
parent | 035d0aa9d5b2768672af89ddd543913ec1f6b657 (diff) | |
download | nextcloud-server-da7a14e9a6cc5a388ae817a226af7fa262fe6846.tar.gz nextcloud-server-da7a14e9a6cc5a388ae817a226af7fa262fe6846.zip |
Merge pull request #1079 from owncloud/update-progress
Updater progress feedback
Diffstat (limited to 'core/templates')
-rw-r--r-- | core/templates/update.php | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/core/templates/update.php b/core/templates/update.php new file mode 100644 index 00000000000..c9f3144f257 --- /dev/null +++ b/core/templates/update.php @@ -0,0 +1,31 @@ +<ul> + <li class='update'> + <?php echo $l->t('Updating ownCloud to version %s, this may take a while.', array($_['version'])); ?><br /><br /> + </li> +</ul> +<script> + $(document).ready(function () { + OC.EventSource.requesttoken = oc_requesttoken; + var updateEventSource = new OC.EventSource(OC.webroot+'/core/ajax/update.php'); + updateEventSource.listen('success', function(message) { + $('<span>').append(message).append('<br />').appendTo($('.update')); + }); + updateEventSource.listen('error', function(message) { + $('<span>').addClass('error').append(message).append('<br />').appendTo($('.update')); + }); + updateEventSource.listen('failure', function(message) { + $('<span>').addClass('error').append(message).append('<br />').appendTo($('.update')); + $('<span>') + .addClass('error bold') + .append('<br />') + .append(t('core', 'The update was unsuccessful. Please report this issue to the <a href="https://github.com/owncloud/core/issues" target="_blank">ownCloud community</a>.')) + .appendTo($('.update')); + }); + updateEventSource.listen('done', function(message) { + $('<span>').addClass('bold').append('<br />').append(t('core', 'The update was successful. Redirecting you to ownCloud now.')).appendTo($('.update')); + setTimeout(function () { + window.location.href = OC.webroot; + }, 3000); + }); + }); +</script>
\ No newline at end of file |