diff options
author | Georg Brandl <georg@python.org> | 2010-11-24 09:17:11 +0100 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2010-11-24 09:17:11 +0100 |
commit | b72e41832e2fa3f8f1f4bc355dc6e4ee4c2f48fa (patch) | |
tree | 08845d2d96922a0b73b5b9fcc10ec29b0a7fa99d /sphinx/themes/basic/static/websupport.js | |
parent | 9481a557c1ae732f2b194e27a54880cfe8b8737d (diff) | |
download | sphinx-git-b72e41832e2fa3f8f1f4bc355dc6e4ee4c2f48fa.tar.gz |
Small tweaks.
Diffstat (limited to 'sphinx/themes/basic/static/websupport.js')
-rw-r--r-- | sphinx/themes/basic/static/websupport.js | 11 |
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); } }); |