From 94e82c781a9bc5a171193523cac50ea83e69dcfd Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sat, 30 Oct 2010 14:49:14 +0000 Subject: handling new album in ajax upload code now --- views/default/tidypics/forms/ajax_upload.php | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'views/default/tidypics') 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'; - ?>
@@ -69,7 +71,7 @@ $basic_uploader_url = current_page_url() . '/basic'; $("#uploadify").uploadify({ 'uploader' : 'mod/tidypics/vendors/uploadify/uploadify.swf', - 'script' : 'action/tidypics/ajax_upload/', + 'script' : '', 'scriptData' : { 'album_guid' : 'guid; ?>', '__elgg_token' : '', @@ -101,6 +103,14 @@ $("#uploadify").uploadify({ }, 'onAllComplete' : function() { $("#tidypics_describe_button").removeClass('tidypics_disable'); + $.post( + '', + { + album_guid : 'guid; ?>', + __elgg_token : '', + __elgg_ts : '' + } + ); }, 'onCancel' : function(event, queueID, fileObj, data) { if (data.fileCount == 0) { -- cgit v1.2.3