mark: A photo of Mark kneeling on top of the Taal Volcano in the Philippines. It was a long hike. (Default)
Mark Smith ([staff profile] mark) wrote in [site community profile] changelog2009-10-26 06:21 am

[dw-free] Make AJAX work on text links in S2

[commit: http://hg.dwscoalition.org/dw-free/rev/af27a0f06576]

http://bugs.dwscoalition.org/show_bug.cgi?id=1953

Remove debugging, fix 'undefined' issue with AJAX on text links.

Patch by [personal profile] wyntarvox.

Files modified:
  • cgi-bin/LJ/S2.pm
  • htdocs/js/esn.js
--------------------------------------------------------------------------------
diff -r 099adaab4735 -r af27a0f06576 cgi-bin/LJ/S2.pm
--- a/cgi-bin/LJ/S2.pm	Mon Oct 26 05:23:54 2009 +0000
+++ b/cgi-bin/LJ/S2.pm	Mon Oct 26 06:21:25 2009 +0000
@@ -3056,7 +3056,7 @@ sub _Comment__get_link
         $btn_params{'js_swapname'}   = $ctx->[S2::PROPS]->{text_multiform_opt_untrack};
 
         if ($key eq "watch_thread" && !$watching_parent) {
-            return LJ::S2::Link( "$LJ::SITEROOT/manage/subscriptions/comments?journal=$u->{'user'}&talkid=$dtalkid&doodah",
+            return LJ::S2::Link( "$LJ::SITEROOT/manage/subscriptions/comments?journal=$u->{'user'}&talkid=$dtalkid",
                                 $ctx->[S2::PROPS]->{"text_multiform_opt_track"},
                                 LJ::S2::Image( "$LJ::IMGPREFIX/silk/entry/track.png", 16, 16, 'Track This' ), %btn_params );
         }
diff -r 099adaab4735 -r af27a0f06576 htdocs/js/esn.js
--- a/htdocs/js/esn.js	Mon Oct 26 05:23:54 2009 +0000
+++ b/htdocs/js/esn.js	Mon Oct 26 06:21:25 2009 +0000
@@ -178,7 +178,7 @@ ESN.trackBtnClickHandler = function (evt
     btnsContainer.appendChild(saveChangesBtn);
 
     var custTrackLink = document.createElement("a");
-    custTrackLink.href = trackBtn.parentNode.href;
+    custTrackLink.href = trackBtn.href;
     btnsContainer.appendChild(custTrackLink);
     custTrackLink.innerHTML = "More Options";
     DOM.addClassName(custTrackLink, "track_moreopts");
@@ -187,7 +187,7 @@ ESN.trackBtnClickHandler = function (evt
 
     DOM.addEventListener(custTrackLink, "click", function (evt) {
         Event.stop(evt);
-        document.location.href = trackBtn.parentNode.href;
+        document.location.href = trackBtn.href;
         if (ESN.trackPopup) ESN.trackPopup.hide();
         return false;
     });
--------------------------------------------------------------------------------
yvi: Kaylee half-smiling, looking very pretty (Default)

[personal profile] yvi 2009-10-26 01:33 pm (UTC)(link)
talkid=$dtalkid&doodah",

:D