From b1a33110fc44d2cf20ab6de6aa68031054ec0761 Mon Sep 17 00:00:00 2001 From: Simon Birnbach Date: Sat, 17 Mar 2012 22:20:39 +0100 Subject: [PATCH] Added global progressbar for all uploads --- files/css/files.css | 1 + files/js/files.js | 14 +++++++++++++- files/templates/index.php | 1 + 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/files/css/files.css b/files/css/files.css index 512e462cb6..60851b6f57 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 666e0c7602..5f61bdd2ac 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 7fc51c288e..abcbd26921 100644 --- a/files/templates/index.php +++ b/files/templates/index.php @@ -21,6 +21,7 @@ +