reviewboard: fix "publish or discard my changes" link (bug 1284513) r?smacleod draft
authorbyron jones <glob@mozilla.com>
Tue, 05 Jul 2016 22:59:05 +0800
changeset 8739 ae84a722400f67fe82e4a9753004bce5560bd207
parent 8735 c877375018fb7441bc37c5e25ee0c2a7d964eb90
push id980
push userbjones@mozilla.com
push dateTue, 05 Jul 2016 14:59:20 +0000
reviewerssmacleod
bugs1284513
reviewboard: fix "publish or discard my changes" link (bug 1284513) r?smacleod Use an absolute instead of a relative url, so it will work from any page. MozReview-Commit-ID: ANq6aBzHwGL
pylib/mozreview/mozreview/static/mozreview/js/commits.js
--- a/pylib/mozreview/mozreview/static/mozreview/js/commits.js
+++ b/pylib/mozreview/mozreview/static/mozreview/js/commits.js
@@ -246,17 +246,17 @@
   }
 
   function augmentNativeBanner() {
     if (!MozReview.isParent) {
       // Unfortunately we cannot publish from children, so provide a link
       // to the parent instead.
       var parent_rrid = $("#mozreview-parent-request").data("id");
       $("#draft-banner").append(
-          $('<a href="../' + parent_rrid + '/" title="You can only Publish or Discard when ' +
+          $('<a href="/r/' + parent_rrid + '/" title="You can only Publish or Discard when ' +
             'viewing the \'Review Summary / Parent\'.">Publish or Discard my changes.</a>'));
     }
   }
 
   var editors = {};
 
   function updateReviewers($reviewer_list, value) {
     var rrid = $reviewer_list.data("id");