mirror of https://github.com/kiwix/libkiwix.git
Render suggestion snippet properly
To render the snippets properly, we need to use the _renderItem property of the autocomple ui.
This commit is contained in:
parent
56434de79e
commit
3288cd80e5
|
@ -34,7 +34,12 @@ jq(document).ready(() => {
|
||||||
$( "#kiwixsearchform" ).submit();
|
$( "#kiwixsearchform" ).submit();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
});
|
}).data( "ui-autocomplete" )._renderItem = function( ul, item ) {
|
||||||
|
return $( "<li>" )
|
||||||
|
.data( "ui-autocomplete-item", item )
|
||||||
|
.append( item.label )
|
||||||
|
.appendTo( ul );
|
||||||
|
};
|
||||||
|
|
||||||
/* cybook hack */
|
/* cybook hack */
|
||||||
if (navigator.userAgent.indexOf("bookeen/cybook") != -1) {
|
if (navigator.userAgent.indexOf("bookeen/cybook") != -1) {
|
||||||
|
|
Loading…
Reference in New Issue