aboutsummaryrefslogtreecommitdiff
path: root/views/default
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2010-10-30 17:26:32 +0000
committerCash Costello <cash.costello@gmail.com>2010-10-30 17:26:32 +0000
commit43c7b8c642a5fc8541122414849a75770975b222 (patch)
treeb093542d2af686565262884aceec9658f7645c7d /views/default
parent6cc8f7714561a681428c2d402b15666e8e0af0fd (diff)
downloadelgg-43c7b8c642a5fc8541122414849a75770975b222.tar.gz
elgg-43c7b8c642a5fc8541122414849a75770975b222.tar.bz2
handling errors in ajax upload
Diffstat (limited to 'views/default')
-rw-r--r--views/default/tidypics/forms/ajax_upload.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/views/default/tidypics/forms/ajax_upload.php b/views/default/tidypics/forms/ajax_upload.php
index 87a6ad0ed..47aa954c7 100644
--- a/views/default/tidypics/forms/ajax_upload.php
+++ b/views/default/tidypics/forms/ajax_upload.php
@@ -83,8 +83,6 @@ $("#uploadify").uploadify({
'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,
@@ -117,8 +115,12 @@ $("#uploadify").uploadify({
}
);
},
- 'onComplete' : function(event, queueID) {
+ 'onComplete' : function(event, queueID, fileObj, response) {
// check for errors here
+ if (response != 'success') {
+ $("#uploadify" + queueID + " .percentage").text(" - " + response);
+ $("#uploadify" + queueID).addClass('uploadifyError');
+ }
$("#uploadify" + queueID + " > .cancel").remove();
return false;
},