aboutsummaryrefslogtreecommitdiff
path: root/views/default
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2010-10-30 14:49:14 +0000
committerCash Costello <cash.costello@gmail.com>2010-10-30 14:49:14 +0000
commit94e82c781a9bc5a171193523cac50ea83e69dcfd (patch)
tree97413da12890bd9f89229a7a2bb3e0ae9cf3e7da /views/default
parent621e0a079c4f9410356c49a39bdd68c098e3bc96 (diff)
downloadelgg-94e82c781a9bc5a171193523cac50ea83e69dcfd.tar.gz
elgg-94e82c781a9bc5a171193523cac50ea83e69dcfd.tar.bz2
handling new album in ajax upload code now
Diffstat (limited to 'views/default')
-rw-r--r--views/default/tidypics/forms/ajax_upload.php16
1 files changed, 13 insertions, 3 deletions
diff --git a/views/default/tidypics/forms/ajax_upload.php b/views/default/tidypics/forms/ajax_upload.php
index fb9060a50..912d1c03e 100644
--- a/views/default/tidypics/forms/ajax_upload.php
+++ b/views/default/tidypics/forms/ajax_upload.php
@@ -10,6 +10,10 @@ $token = generate_action_token($ts);
$batch = time();
+$basic_uploader_url = current_page_url() . '/basic';
+
+$upload_endpoint_url = "{$vars['url']}action/tidypics/ajax_upload/";
+$upload_complete_url = "{$vars['url']}action/tidypics/ajax_upload_complete/";
$maxfilesize = (float) get_plugin_setting('maxfilesize','tidypics');
if (!$maxfilesize) {
@@ -33,8 +37,6 @@ if ($quota) {
}
}
-$basic_uploader_url = current_page_url() . '/basic';
-
?>
<div class="contentWrapper">
@@ -69,7 +71,7 @@ $basic_uploader_url = current_page_url() . '/basic';
$("#uploadify").uploadify({
'uploader' : '<?php echo $vars['url']; ?>mod/tidypics/vendors/uploadify/uploadify.swf',
- 'script' : '<?php echo $vars['url']; ?>action/tidypics/ajax_upload/',
+ 'script' : '<?php echo $upload_endpoint_url; ?>',
'scriptData' : {
'album_guid' : '<?php echo $album->guid; ?>',
'__elgg_token' : '<?php echo $token; ?>',
@@ -101,6 +103,14 @@ $("#uploadify").uploadify({
},
'onAllComplete' : function() {
$("#tidypics_describe_button").removeClass('tidypics_disable');
+ $.post(
+ '<?php echo $upload_complete_url; ?>',
+ {
+ album_guid : '<?php echo $album->guid; ?>',
+ __elgg_token : '<?php echo $token; ?>',
+ __elgg_ts : '<?php echo $ts; ?>'
+ }
+ );
},
'onCancel' : function(event, queueID, fileObj, data) {
if (data.fileCount == 0) {