From eb34b301a75237a0c27b5cca01e6f96e436b7709 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Thu, 19 Nov 2009 18:08:32 -0800 Subject: Add the ability to add tags for files that are uploaded using the simple loader. --- modules/gallery/views/simple_uploader.html.php | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'modules/gallery/views') diff --git a/modules/gallery/views/simple_uploader.html.php b/modules/gallery/views/simple_uploader.html.php index 80dcc5bc..45fb6a4d 100644 --- a/modules/gallery/views/simple_uploader.html.php +++ b/modules/gallery/views/simple_uploader.html.php @@ -21,6 +21,7 @@ script: "id}") ?>", scriptData: Session::instance()->id(), + "tags" => "", "user_agent" => Input::instance()->server("HTTP_USER_AGENT"), "csrf" => $csrf)) ?>, fileExt: "*.gif;*.jpg;*.jpeg;*.png;*.flv;*.mp4;*.GIF;*.JPG;*.JPEG;*.PNG;*.FLV;*.MP4", @@ -45,7 +46,6 @@ return true; }, onComplete: function(event, queueID, fileObj, response, data) { - // @todo handle a response of "Error: xxxx" as an error var re = /^error: (.*)$/i; var msg = re.exec(response); if (msg) { @@ -57,7 +57,6 @@ } return true; }, - onError: function(event, queueID, fileObj, errorObj) { var msg = " - "; if (errorObj.type == "HTTP") { @@ -91,6 +90,15 @@ return true; } }); + + $('#g-add-photos-tags').autocomplete( + '', + {max: 30, multiple: true, multipleSeparator: ',', cacheLength: 1} + ); + $('#g-add-photos-tags').blur(function (event) { + $("#g-uploadify").uploadifySettings("scriptData", {"tags": $(this).val()}); + }); + }); @@ -122,6 +130,13 @@ + +
+ + +
+ +
-- cgit v1.2.3