From 621e0a079c4f9410356c49a39bdd68c098e3bc96 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sat, 30 Oct 2010 14:30:24 +0000 Subject: managing the workflow for uploading images --- views/default/tidypics/forms/ajax_upload.php | 32 +++++++++++++++++++--------- 1 file changed, 22 insertions(+), 10 deletions(-) (limited to 'views/default/tidypics/forms') diff --git a/views/default/tidypics/forms/ajax_upload.php b/views/default/tidypics/forms/ajax_upload.php index c906b7673..fb9060a50 100644 --- a/views/default/tidypics/forms/ajax_upload.php +++ b/views/default/tidypics/forms/ajax_upload.php @@ -53,12 +53,12 @@ $basic_uploader_url = current_page_url() . '/basic';
  • - + 2.
  • - + 3.
  • @@ -78,14 +78,14 @@ $("#uploadify").uploadify({ 'batch' : '' }, 'fileDataName' : 'Image', - 'cancelImg' : '_graphics/icon_customise_remove.gif', - 'multi' : true, - 'auto' : false, - 'fileDesc' : '', - 'fileExt' : '*.jpg;*.jpeg;*.png;*.gif', - 'wmode' : 'transparent', - 'buttonImg' : " ", - 'height' : 20, + 'cancelImg' : '_graphics/icon_customise_remove.gif', + 'multi' : true, + 'auto' : false, + 'fileDesc' : '', + 'fileExt' : '*.jpg;*.jpeg;*.png;*.gif', + 'wmode' : 'transparent', + 'buttonImg' : " ", + 'height' : 20, 'onEmbedFlash' : function(event) { $("#" + event.id).hover( function(){ @@ -95,7 +95,19 @@ $("#uploadify").uploadify({ $("#tidypics_choose_button").removeClass('tidypics_choose_button_hover'); } ); + }, + 'onSelectOnce' : function() { + $("#tidypics_upload_button").removeClass('tidypics_disable'); + }, + 'onAllComplete' : function() { + $("#tidypics_describe_button").removeClass('tidypics_disable'); + }, + 'onCancel' : function(event, queueID, fileObj, data) { + if (data.fileCount == 0) { + $("#tidypics_upload_button").addClass('tidypics_disable'); + } } + }); -- cgit v1.2.3