]> git.mxchange.org Git - friendica.git/blobdiff - mod/contacts.php
Merge https://github.com/friendica/friendica into pull
[friendica.git] / mod / contacts.php
index fb4595739b5e1f3047ddf67d1b4bb0b6075e2fb8..bdf49898936658ca6752b92080737f6dd1e103c9 100644 (file)
@@ -45,22 +45,16 @@ function contacts_init(&$a) {
        $a->page['aside'] .= networks_widget('contacts',$_GET['nets']);
        $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 = $("#contacts-search").autocomplete({ 
-               serviceUrl: '$base/acl',
-               minChars: 2,
-               width: 350,
-       });
-       a.setOptions({ params: { type: 'a' }});
-
-}); 
-
-</script>
-EOT;
+       $tpl = get_markup_template("contacts-head.tpl");
+       $a->page['htmlhead'] .= replace_macros($tpl,array(
+               '$baseurl' => $a->get_baseurl(true),
+               '$base' => $base
+       ));
+       $tpl = get_markup_template("contacts-end.tpl");
+       $a->page['end'] .= replace_macros($tpl,array(
+               '$baseurl' => $a->get_baseurl(true),
+               '$base' => $base
+       ));
 
 
 }
@@ -247,6 +241,10 @@ function contacts_content(&$a) {
                        '$baseurl' => $a->get_baseurl(true),
                        '$editselect' => $editselect,
                ));
+               $a->page['end'] .= replace_macros(get_markup_template('contact_end.tpl'), array(
+                       '$baseurl' => $a->get_baseurl(true),
+                       '$editselect' => $editselect,
+               ));
 
                require_once('include/contact_selectors.php');