From fc143dea9cd54f898c225e144efb34fa1cd9abde Mon Sep 17 00:00:00 2001 From: mistic100 Date: Wed, 3 Sep 2014 19:56:59 +0000 Subject: feature:2616 add custom big progressbar git-svn-id: http://piwigo.org/svn/trunk@29394 68402e56-0260-453c-a942-63ccdbb3a9ee --- .../themes/default/template/photos_add_direct.tpl | 24 ++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'admin/themes/default/template') diff --git a/admin/themes/default/template/photos_add_direct.tpl b/admin/themes/default/template/photos_add_direct.tpl index 2f1fba296..b8e179b39 100644 --- a/admin/themes/default/template/photos_add_direct.tpl +++ b/admin/themes/default/template/photos_add_direct.tpl @@ -96,6 +96,12 @@ jQuery(document).ready(function(){ e.preventDefault(); up.start(); }); + + jQuery('#cancelUpload').on('click', function(e) { + e.preventDefault(); + up.stop(); + up.trigger('UploadComplete', up.files); + }); } }, @@ -105,11 +111,16 @@ jQuery(document).ready(function(){ jQuery('#startUpload').prop('disabled', up.files.length == 0); }, + UploadProgress: function(up, file) { + jQuery('#uploadingActions .progressbar').width(up.total.percent+'%'); + }, + BeforeUpload: function(up, file) { //console.log('[BeforeUpload]', file); // hide buttons jQuery('#startUpload, #addFiles').hide(); + jQuery('#uploadingActions').show(); // warn user if she wants to leave page while upload is running jQuery(window).bind('beforeunload', function() { @@ -180,6 +191,7 @@ jQuery(document).ready(function(){ jQuery(".batchLink").html(sprintf(batch_Label, uploadedPhotos.length)); jQuery(".afterUploadActions").show(); + jQuery('#uploadingActions').hide(); // user can safely leave page without warning jQuery(window).unbind('beforeunload'); @@ -265,10 +277,18 @@ jQuery(document).ready(function(){

Your browser doesn't have HTML5 support.

- - + + + + -- cgit v1.2.3