Move 'Hide Search Matches' to search box.

This is (a) semantically cleaner and (b) shows that feature even when source
links are disabled.
This commit is contained in:
Robert Lehmann 2011-10-02 17:03:56 +02:00
parent 478ffe5632
commit c6d9f56895

View File

@ -185,9 +185,9 @@ var Documentation = {
body.highlightText(this.toLowerCase(), 'highlighted');
});
}, 10);
$('<li class="highlight-link"><a href="javascript:Documentation.' +
'hideSearchWords()">' + _('Hide Search Matches') + '</a></li>')
.appendTo($('.sphinxsidebar .this-page-menu'));
$('<p class="highlight-link"><a href="javascript:Documentation.' +
'hideSearchWords()">' + _('Hide Search Matches') + '</a></p>')
.appendTo($('#searchbox'));
}
},
@ -213,7 +213,7 @@ var Documentation = {
* helper function to hide the search marks again
*/
hideSearchWords : function() {
$('.sphinxsidebar .this-page-menu li.highlight-link').fadeOut(300);
$('#searchbox .highlight-link').fadeOut(300);
$('span.highlighted').removeClass('highlighted');
},