Implemented typeahead suggest

Use Twitter Bootstrap JavaScript framework for typeahead support.

Add a new "suggest" JSON method, which returns the first 20
packages that match the beginning characters of a query.

canyonknight: Link format change, commit message
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
Marcel Korpel 2012-12-23 21:23:45 +00:00 committed by Lukas Fleischer
parent b8f07c4c45
commit b004333ead
4 changed files with 354 additions and 2 deletions

View file

@ -118,6 +118,10 @@ if (!empty($tokens[1]) && '/' . $tokens[1] == get_pkg_route()) {
header("Content-Type: image/png");
include "./$path";
break;
case "/js/bootstrap-typeahead.js":
header("Content-Type: application/javascript");
include "./$path";
break;
default:
header("HTTP/1.0 404 Not Found");
include "./404.php";