diff options
author | Thomas Mueller <thomas.mueller@tmit.eu> | 2013-01-06 22:40:35 +0100 |
---|---|---|
committer | Thomas Mueller <thomas.mueller@tmit.eu> | 2013-01-06 22:40:35 +0100 |
commit | bae175518427de1f43ac23dbc1e06a15f6933370 (patch) | |
tree | 90cdee24789526b1b6da16eda90e2c1547a66e62 /core/templates/update.php | |
parent | 39d874cd902a4e3d4f7ae313ec5e15bafe35df13 (diff) | |
parent | 08d7b8ce309baebfc243727c215b63e732bf874e (diff) | |
download | nextcloud-server-bae175518427de1f43ac23dbc1e06a15f6933370.tar.gz nextcloud-server-bae175518427de1f43ac23dbc1e06a15f6933370.zip |
Merge branch 'master' into fixing-784-master
Conflicts:
apps/files/ajax/upload.php
apps/files/js/files.js
lib/helper.php
Diffstat (limited to 'core/templates/update.php')
-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 |