+ implement the suggestion in kiwix-serve

This commit is contained in:
kelson42
2012-08-13 23:37:51 +00:00
parent d37e2355f8
commit c55de68072
2 changed files with 93 additions and 35 deletions

View File

@ -1,10 +1,42 @@
<script>
$(function() {
var availableTags = [
"ActionScript",
"AppleScript",
"Asp",
"BASIC",
"C",
"C++",
"Clojure",
"COBOL",
"ColdFusion",
"Erlang",
"Fortran",
"Groovy",
"Haskell",
"Java",
"JavaScript",
"Lisp",
"Perl",
"PHP",
"Python",
"Ruby",
"Scala",
"Scheme"
];
$( "#kiwixsearchbox" ).autocomplete({
source: "/suggest?content=__CONTENT__"
});
});
</script>
<span id="kiwixtoolbar" class="ui-widget-header ui-corner-all">
<button id="kiwixlibrary" onclick="window.location.href='/';">Library</button>
<button id="kiwixhome" onclick="window.location.href='/__CONTENT__/';">Home</button>
<form method="GET" action="/search" />
<input type="submit" id="kiwixsearch" value="Search" />
<input id="kiwixsearchbox" type="textbox" name="pattern" />
<input type="hidden" name="content" value="__CONTENT__" />
<input type="submit" id="kiwixsearch" value="Search" />
<input id="kiwixsearchbox" name="pattern"/>
</form>
</span>
<div style="display: block; height: 40px;"></div>