diff options
author | Cash Costello <cash.costello@gmail.com> | 2010-10-30 17:26:32 +0000 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2010-10-30 17:26:32 +0000 |
commit | 43c7b8c642a5fc8541122414849a75770975b222 (patch) | |
tree | b093542d2af686565262884aceec9658f7645c7d /views | |
parent | 6cc8f7714561a681428c2d402b15666e8e0af0fd (diff) | |
download | elgg-43c7b8c642a5fc8541122414849a75770975b222.tar.gz elgg-43c7b8c642a5fc8541122414849a75770975b222.tar.bz2 |
handling errors in ajax upload
Diffstat (limited to 'views')
-rw-r--r-- | views/default/tidypics/forms/ajax_upload.php | 8 |
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; }, |