summaryrefslogtreecommitdiffstats
path: root/files
diff options
context:
space:
mode:
authorSimon Birnbach <simon@simon-birnbach.de>2012-03-17 22:20:39 +0100
committerSimon Birnbach <simon@simon-birnbach.de>2012-03-17 22:20:39 +0100
commitb1a33110fc44d2cf20ab6de6aa68031054ec0761 (patch)
tree0ba975fc2ea67c83ffe8eb64d48f2d96d4677105 /files
parent38072e1900b2f3b5d0d9d0d7bd78658026a8ab23 (diff)
downloadnextcloud-server-b1a33110fc44d2cf20ab6de6aa68031054ec0761.tar.gz
nextcloud-server-b1a33110fc44d2cf20ab6de6aa68031054ec0761.zip
Added global progressbar for all uploads
Diffstat (limited to 'files')
-rw-r--r--files/css/files.css1
-rw-r--r--files/js/files.js14
-rw-r--r--files/templates/index.php1
3 files changed, 15 insertions, 1 deletions
diff --git a/files/css/files.css b/files/css/files.css
index 512e462cb6f..60851b6f57e 100644
--- a/files/css/files.css
+++ b/files/css/files.css
@@ -30,6 +30,7 @@
.file_upload_filename { position: relative; z-index:100; padding-left: 0.8em; padding-right: 0.8em; cursor:pointer; border-top-left-radius:0; border-bottom-left-radius:0; }
.file_upload_filename img { position: absolute; top: 0.4em; left: 0.4em; }
+#uploadprogressbar { position:absolute; right:14.5em; display:inline-block; width:10em; height:1.5em; top:.4em; }
.file_upload_form, .file_upload_wrapper, .file_upload_start, .file_upload_filename, #file_upload_submit { cursor:pointer; }
diff --git a/files/js/files.js b/files/js/files.js
index 666e0c7602f..5f61bdd2ac3 100644
--- a/files/js/files.js
+++ b/files/js/files.js
@@ -223,7 +223,19 @@ $(document).ready(function() {
// TODO: cancel upload & display error notification
},
progress: function(e, data) {
- // TODO: show nice progress bar
+ // TODO: show nice progress bar in file row
+ },
+ progressall: function(e, data) {
+ var progress = (data.loaded/data.total)*100;
+ $('#uploadprogressbar').progressbar('value',progress);
+ },
+ start: function(e, data) {
+ $('#uploadprogressbar').progressbar({value:0});
+ $('#uploadprogressbar').fadeIn();
+ },
+ stop: function(e, data) {
+ $('#uploadprogressbar').progressbar('value',100);
+ $('#uploadprogressbar').fadeOut();
}
})
});
diff --git a/files/templates/index.php b/files/templates/index.php
index 7fc51c288e1..abcbd269211 100644
--- a/files/templates/index.php
+++ b/files/templates/index.php
@@ -21,6 +21,7 @@
<iframe name="file_upload_target_1" class='file_upload_target' src=""></iframe>
</form>
</div>
+ <div id="uploadprogressbar"></div>
</div>
<div id="file_action_panel"></div>
<?php else:?>