unified search autocomplete backend, browser performance seems to be a bit sucky

This commit is contained in:
friendica
2012-07-16 18:14:45 -07:00
parent d3d60c8ae5
commit 07c31d547f
2 changed files with 104 additions and 0 deletions

View File

@@ -114,6 +114,25 @@ function network_init(&$a) {
$a->page['aside'] .= saved_searches($search);
$a->page['aside'] .= fileas_widget($a->get_baseurl(true) . '/network',(x($_GET, 'file') ? $_GET['file'] : ''));
$base = $a->get_baseurl();
$a->page['htmlhead'] .= '<script src="' . $a->get_baseurl(true) . '/library/jquery_ac/friendica.complete.js" ></script>';
$a->page['htmlhead'] .= <<< EOT
<script>$(document).ready(function() {
var a;
a = $("#search-text").autocomplete({
serviceUrl: '$base/search_ac',
minChars: 2,
width: 350,
});
});
</script>
EOT;
}
function saved_searches($search) {