aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/js/upgrade.js
diff options
context:
space:
mode:
authorBjörn Schießle <schiessle@owncloud.com>2013-01-31 10:55:59 +0100
committerBjörn Schießle <schiessle@owncloud.com>2013-01-31 10:55:59 +0100
commit54eeb8b8fcff13d29ae363e7ca5e6da707fdd6b7 (patch)
tree48c2eb0ad04a4bd921f223258e41beba2e2c6539 /apps/files/js/upgrade.js
parent9c83b307f6d49f30c4cc6db7258d7e3851bac0b7 (diff)
parent00a30e665128352e9b20268ea65400a968903c74 (diff)
downloadnextcloud-server-54eeb8b8fcff13d29ae363e7ca5e6da707fdd6b7.tar.gz
nextcloud-server-54eeb8b8fcff13d29ae363e7ca5e6da707fdd6b7.zip
fix merge conflict
Diffstat (limited to 'apps/files/js/upgrade.js')
-rw-r--r--apps/files/js/upgrade.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/apps/files/js/upgrade.js b/apps/files/js/upgrade.js
new file mode 100644
index 00000000000..02d57fc9e6c
--- /dev/null
+++ b/apps/files/js/upgrade.js
@@ -0,0 +1,17 @@
+$(document).ready(function () {
+ var eventSource, total, bar = $('#progressbar');
+ console.log('start');
+ bar.progressbar({value: 0});
+ eventSource = new OC.EventSource(OC.filePath('files', 'ajax', 'upgrade.php'));
+ eventSource.listen('total', function (count) {
+ total = count;
+ console.log(count + ' files needed to be migrated');
+ });
+ eventSource.listen('count', function (count) {
+ bar.progressbar({value: (count / total) * 100});
+ console.log(count);
+ });
+ eventSource.listen('done', function () {
+ document.location.reload();
+ });
+});