Commits

Robert Lehmann committed 4a39eb4

Move 'Hide Search Matches' to search box.

This is (a) semantically cleaner and (b) shows that feature even when source
links are disabled.

  • Participants
  • Parent commits 718a799

Comments (0)

Files changed (1)

File sphinx/themes/basic/static/doctools.js

           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'));
     }
   },
 
    * 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');
   },