Committer: pkornilov
LJSUP-8689: Donate buttonU trunk/htdocs/js/journal.js
Modified: trunk/htdocs/js/journal.js =================================================================== --- trunk/htdocs/js/journal.js 2011-05-19 04:26:51 UTC (rev 19081) +++ trunk/htdocs/js/journal.js 2011-05-19 06:15:59 UTC (rev 19082) @@ -136,7 +136,8 @@ donate: function(node, journal, id) { if (confirm(DonateButton.ml_confirm_message)) { - jQuery.post(LiveJournal.getAjaxUrl('give_tokens') + '?journal=' + journal + '&id=' + id, { + jQuery.post(LiveJournal.getAjaxUrl('give_tokens') + '?journal=' + journal + '&itemid=' + id + '&mode=jsonp', { + auth_token: DonateButton.lj_form_auth, confirm: 1 }, function(data) { jQuery(node).find('lj-button-c').text(data.donated_text); @@ -148,7 +149,7 @@ jQuery(document).delegate('a', 'click', function(e) { if (this.href && this.href.indexOf(Site.siteroot + '/give_tokens.bml?journal=') === 0) { var parsed_url = LiveJournal.parseGetArgs(this.href); - DonateButton.donate(this, parsed_url.journal, parsed_url.id); + DonateButton.donate(this, parsed_url.journal, parsed_url.itemid); e.preventDefault(); } });