summaryrefslogtreecommitdiff
path: root/sphinx/themes/basic/static/websupport.js
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-11-24 09:17:11 +0100
committerGeorg Brandl <georg@python.org>2010-11-24 09:17:11 +0100
commitb72e41832e2fa3f8f1f4bc355dc6e4ee4c2f48fa (patch)
tree08845d2d96922a0b73b5b9fcc10ec29b0a7fa99d /sphinx/themes/basic/static/websupport.js
parent9481a557c1ae732f2b194e27a54880cfe8b8737d (diff)
downloadsphinx-git-b72e41832e2fa3f8f1f4bc355dc6e4ee4c2f48fa.tar.gz
Small tweaks.
Diffstat (limited to 'sphinx/themes/basic/static/websupport.js')
-rw-r--r--sphinx/themes/basic/static/websupport.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/sphinx/themes/basic/static/websupport.js b/sphinx/themes/basic/static/websupport.js
index dc4cf6ac9..eaea0de7b 100644
--- a/sphinx/themes/basic/static/websupport.js
+++ b/sphinx/themes/basic/static/websupport.js
@@ -54,7 +54,7 @@
hide($(this).attr('id').substring(2));
return false;
});
- $('.vote').live("click", function() {
+ $('a.vote').live("click", function() {
handleVote($(this));
return false;
});
@@ -96,6 +96,7 @@
});
$('a.comment-markup').live("click", function() {
toggleCommentMarkupBox($(this).attr('id').substring(2));
+ return false;
});
}
@@ -323,6 +324,7 @@
data: {id: id},
success: function(data, textStatus, request) {
$('#cm' + id).fadeOut('fast');
+ $('#cd' + id).removeClass('moderate');
},
error: function(request, textStatus, error) {
showError('Oops, there was a problem accepting the comment.');
@@ -681,7 +683,7 @@
<div class="sphinx-comments" id="sc<%id%>">\
<p class="sort-options">\
Sort by:\
- <a href="#" class="sort-option byrating">top</a>\
+ <a href="#" class="sort-option byrating">best rated</a>\
<a href="#" class="sort-option byascage">newest</a>\
<a href="#" class="sort-option byage">oldest</a>\
</p>\
@@ -779,10 +781,10 @@
})(jQuery);
$(document).ready(function() {
- /** Add comment anchors for all paragraphs that are commentable. */
+ // add comment anchors for all paragraphs that are commentable
$('.sphinx-has-comment').comment();
- /** Highlight search words in search results. */
+ // highlight search words in search results
$("div.context").each(function() {
var params = $.getQueryParameters();
var terms = (params.q) ? params.q[0].split(/\s+/) : [];
@@ -796,5 +798,6 @@ $(document).ready(function() {
var anchor = document.location.hash;
if (anchor.substring(0, 9) == '#comment-') {
$('#ao' + anchor.substring(9)).click();
+ document.location.hash = '#s' + anchor.substring(9);
}
});