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 @@
\

\ Sort by:\ - top\ + best rated\ newest\ oldest\

\ @@ -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); } });