diff options
author | Cash Costello <cash.costello@gmail.com> | 2010-10-30 14:30:24 +0000 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2010-10-30 14:30:24 +0000 |
commit | 621e0a079c4f9410356c49a39bdd68c098e3bc96 (patch) | |
tree | fb4bb6f9e30cde84cb1e4657c7709b7e6c70c4da | |
parent | 22383071d02cea7aaaed09957fad2ccd0a4b1b04 (diff) | |
download | elgg-621e0a079c4f9410356c49a39bdd68c098e3bc96.tar.gz elgg-621e0a079c4f9410356c49a39bdd68c098e3bc96.tar.bz2 |
managing the workflow for uploading images
-rw-r--r-- | views/default/tidypics/css.php | 10 | ||||
-rw-r--r-- | views/default/tidypics/forms/ajax_upload.php | 32 |
2 files changed, 32 insertions, 10 deletions
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'; </div> </li> <li> - <a href="javascript:$('#uploadify').uploadifyUpload();"> + <a id="tidypics_upload_button" class="tidypics_disable" href="javascript:$('#uploadify').uploadifyUpload();"> 2. <?php echo elgg_echo('tidypics:uploader:upload'); ?> </a> </li> <li> - <a href="<?php echo $vars['url']; ?>pg/photos/batch/<?php echo $batch; ?>"> + <a id="tidypics_describe_button" class="tidypics_disable" href="<?php echo $vars['url']; ?>pg/photos/batch/<?php echo $batch; ?>"> 3. <?php echo elgg_echo('tidypics:uploader:describe'); ?> </a> </li> @@ -78,14 +78,14 @@ $("#uploadify").uploadify({ 'batch' : '<?php echo $batch; ?>' }, 'fileDataName' : 'Image', - 'cancelImg' : '<?php echo $vars['url']; ?>_graphics/icon_customise_remove.gif', - 'multi' : true, - 'auto' : false, - 'fileDesc' : '<?php echo elgg_echo('tidypics:uploader:filedesc'); ?>', - 'fileExt' : '*.jpg;*.jpeg;*.png;*.gif', - 'wmode' : 'transparent', - 'buttonImg' : " ", - 'height' : 20, + 'cancelImg' : '<?php echo $vars['url']; ?>_graphics/icon_customise_remove.gif', + 'multi' : true, + 'auto' : false, + 'fileDesc' : '<?php echo elgg_echo('tidypics:uploader: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'); + } } + }); </script> |