From db769b76ab7b7ed54579225fca836defc7afbd11 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Tue, 31 Aug 2010 00:03:46 -0700 Subject: Expire completed uploads and introduce a text message that says how many photos have been uploaded successfully. This is to pave the way for retry code later on. --- modules/gallery/controllers/uploader.php | 8 ++++++ modules/gallery/css/gallery.css | 4 +++ modules/gallery/views/form_uploadify.html.php | 32 +++++++++++++++++----- .../gallery/views/form_uploadify_buttons.html.php | 1 + 4 files changed, 38 insertions(+), 7 deletions(-) (limited to 'modules') diff --git a/modules/gallery/controllers/uploader.php b/modules/gallery/controllers/uploader.php index 85d344d6..fb496f60 100644 --- a/modules/gallery/controllers/uploader.php +++ b/modules/gallery/controllers/uploader.php @@ -102,6 +102,14 @@ class Uploader_Controller extends Controller { } } + public function status($success_count, $error_count) { + // The "errors" won't be properly pluralized :-/ + print t2("Uploaded %count photo (%error errors)", + "Uploaded %count photos (%error errors)", + $success_count, + array("error" => $error_count)); + } + public function finish() { access::verify_csrf(); diff --git a/modules/gallery/css/gallery.css b/modules/gallery/css/gallery.css index fb72bd48..8012c6cc 100644 --- a/modules/gallery/css/gallery.css +++ b/modules/gallery/css/gallery.css @@ -78,6 +78,10 @@ margin-bottom: 0 } +#g-add-photos-status-message { + float: right; +} + /* Permissions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ #g-edit-permissions-form { diff --git a/modules/gallery/views/form_uploadify.html.php b/modules/gallery/views/form_uploadify.html.php index 2ed7912f..36f5f284 100644 --- a/modules/gallery/views/form_uploadify.html.php +++ b/modules/gallery/views/form_uploadify.html.php @@ -3,7 +3,24 @@