@@ -64,6 +64,9 @@ <h1>Opening library documentation failed</h1>
64
64
renderTemplate ( 'tags-shortcuts' , libdoc ) ;
65
65
}
66
66
scrollToHash ( ) ;
67
+ setTimeout ( function ( ) {
68
+ document . getElementById ( "keyword-statistics-header" ) . innerText = '' + libdoc . keywords . length ;
69
+ } , 0 ) ;
67
70
} ) ;
68
71
69
72
function parseTemplates ( ) {
@@ -136,9 +139,7 @@ <h1>Opening library documentation failed</h1>
136
139
libdoc . selectedTag = include . tagsExact ? pattern : "" ;
137
140
renderTemplate ( 'tags-shortcuts' , libdoc ) ;
138
141
}
139
- const ending = matchCount !== 1 ? 's.' : '.' ;
140
- $ ( '#match-count' ) . show ( ) . text ( matchCount + ' matched keyword' + ending ) ;
141
- $ ( '#altogether-count' ) . hide ( ) ;
142
+ document . getElementById ( "keyword-statistics-header" ) . innerText = matchCount + ' / ' + result . keywords . length ;
142
143
if ( matchCount === 0 )
143
144
$ ( '#keywords-container' ) . find ( 'table' ) . empty ( ) ;
144
145
}
@@ -198,8 +199,7 @@ <h1>Opening library documentation failed</h1>
198
199
if ( libdoc . contains_tags ) {
199
200
renderTemplate ( 'tags' , libdoc ) ;
200
201
}
201
- $ ( '#match-count' ) . hide ( ) ;
202
- $ ( '#altogether-count' ) . show ( ) ;
202
+ document . getElementById ( "keyword-statistics-header" ) . innerText = '' + libdoc . keywords . length ;
203
203
history . replaceState && history . replaceState ( null , '' , location . pathname ) ;
204
204
}
205
205
@@ -303,7 +303,7 @@ <h4>Documentation</h4>
303
303
< select id = "tags-shortcuts-container" onchange = "location = this.value;" >
304
304
</ select >
305
305
{ { / i f } }
306
- < h4 > Keywords</ h4 >
306
+ < h4 > Keywords ( < span id = "keyword-statistics-header" > </ span > ) </ h4 >
307
307
< ul class = "shortcuts" id = "keyword-shortcuts-container" >
308
308
< / ul >
309
309
</ div >
@@ -397,9 +397,6 @@ <h4>Documentation</h4>
397
397
398
398
< script type ="text/x-jquery-tmpl " id ="footer-template ">
399
399
< p class = "footer" >
400
- < span id = "altogether-count" > Altogether ${ keywords . length } keywords.</ span >
401
- < span id = "match-count" > </ span >
402
- < br >
403
400
Generated by < a href = "http://robotframework.org/robotframework/#built-in-tools" > Libdoc</ a > on ${ generated } .
404
401
</ p >
405
402
</ script >
0 commit comments