Палсеич— (lusever) wrote in changelog,
Палсеич—
lusever
changelog

[livejournal] r19082: LJSUP-8689: Donate button

Committer: pkornilov
LJSUP-8689: Donate button
U   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();
 	}
 });

Tags: js, livejournal, lusever
Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments