aboutsummaryrefslogtreecommitdiff
path: root/views/default
diff options
context:
space:
mode:
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) {