aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--views/default/tidypics/css.php10
-rw-r--r--views/default/tidypics/forms/ajax_upload.php32
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>