33< head >
44< meta charset ="utf-8 ">
55< meta name ="viewport " content ="initial-scale=1 ">
6- < title > doxdox-plugin-bootstrap 1.1.4 — Bootstrap template plugin for doxdox.</ title >
6+ < title > doxdox-plugin-bootstrap 1.1.5 — Bootstrap template plugin for doxdox.</ title >
77< meta name ="description " content ="Bootstrap template plugin for doxdox. ">
88< link rel ="stylesheet " href ="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.6/css/bootstrap.min.css ">
99< link rel ="stylesheet " href ="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.10.0/styles/github.min.css ">
1010< style >
1111
12+ input [type = "search" ]::-webkit-search-cancel-button {
13+ -webkit-appearance : searchfield-cancel-button;
14+ }
15+
1216.jumbotron {
1317 margin-bottom : 0 ;
1418 border-radius : 0 ;
159163
160164 < h1 >
161165 < a href ="https://github.com/neogeek/doxdox-plugin-bootstrap "> doxdox-plugin-bootstrap</ a >
162- < small > 1.1.4 </ small >
166+ < small > 1.1.5 </ small >
163167 </ h1 >
164168
165169 < p > Bootstrap template plugin for doxdox.</ p >
176180
177181 < div class ="col-md-3 hidden-sm hidden-xs ">
178182
179- < input type ="text " class ="form-control search " id ="search-methods " placeholder ="Search... " autocomplete ="off ">
183+ < input type ="search " class ="form-control search " id ="search-methods " placeholder ="Search... " autocomplete ="off ">
180184
181185 < ul class ="menu ">
182186
@@ -337,9 +341,13 @@ <h3>Returns</h3>
337341 hljs . highlightBlock ( this ) ;
338342 } ) ;
339343
344+ var $searchInput = $ ( '#search-methods' ) ;
340345 var $methodLinks = $ ( '.method-link' ) ;
346+ var $methodNames = $ ( '.method .method-name' ) ;
341347
342- $ ( '#search-methods' ) . on ( 'keyup' , function ( e ) {
348+ var urlQuery = window . location . search . match ( / q = ( [ ^ & ] + ) / ) ;
349+
350+ $searchInput . on ( 'keyup' , function ( e ) {
343351
344352 var query = new RegExp ( e . target . value . replace ( ' ' , '|' ) , 'ig' ) ;
345353
@@ -359,8 +367,38 @@ <h3>Returns</h3>
359367
360368 } ) ;
361369
370+ $methodNames . each ( function ( ) {
371+
372+ var $this = $ ( this ) ;
373+
374+ if ( ! $this . text ( ) . match ( query ) ) {
375+
376+ $this . closest ( '.method' ) . hide ( ) ;
377+
378+ } else {
379+
380+ $this . closest ( '.method' ) . show ( ) ;
381+
382+ }
383+
384+ } ) ;
385+
386+ window . history . replaceState ( { } , '' , window . location . pathname + '?q=' + e . target . value ) ;
387+
388+ } ) ;
389+
390+ $searchInput . on ( 'search' , function ( ) {
391+
392+ $searchInput . trigger ( 'keyup' ) ;
393+
362394 } ) ;
363395
396+ if ( urlQuery && urlQuery . length > 1 ) {
397+
398+ $searchInput . val ( urlQuery [ 1 ] ) . trigger ( 'keyup' ) ;
399+
400+ }
401+
364402 $ ( window ) . on ( 'scroll' , handleScrollEvent ) ;
365403
366404 handleScrollEvent ( ) ;
0 commit comments