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/css.php | 10 +++++++++ views/default/tidypics/forms/ajax_upload.php | 32 +++++++++++++++++++--------- 2 files changed, 32 insertions(+), 10 deletions(-) (limited to 'views/default/tidypics') diff --git a/views/default/tidypics/css.php b/views/default/tidypics/css.php index d836cabcf..6932b8a75 100644 --- a/views/default/tidypics/css.php +++ b/views/default/tidypics/css.php @@ -323,6 +323,15 @@ color:#0054a7; text-decoration:underline; } +.tidypics_disable { +color:#cccccc; +} + +.tidypics_disable:hover { +color:#cccccc; +text-decoration:none; +} + .uploadifyQueueItem { background-color:#F5F5F5; @@ -341,6 +350,7 @@ border-width:1px; margin-top:10px; width:100%; } + .uploadifyProgressBar { background-color: #0099FF; width: 1px; 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