Don't break urls going to the new version.

rtd2
Eric Holscher 2011-06-21 20:42:33 -07:00
parent 50728f19b2
commit 780b0a78cd
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@ warning = '<div class="admonition note"> <p class="first admonition-title">Note<
url: "/api/v1/version/" + doc_slug + "/highest/" + doc_version + "/",
success: function(data, textStatus, request) {
if (!data.is_highest) {
$("div.body").prepend(warning + "<a href='http://readthedocs.org" + data.url + "'>" + data.version + "</a> is the newest version. </p></div>")
$("div.body").prepend(warning + "<a href='http://readthedocs.org" + data.url + window.location.pathname + "'>" + data.version + "</a> is the newest version. </p></div>")
}
},
dataType: 'json'