aboutsummaryrefslogtreecommitdiffstats
path: root/mod/message.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-05-06 20:08:20 -0700
committerfriendica <info@friendica.com>2012-05-06 20:08:20 -0700
commitb3b303f037c2142d0a388dc25b420dd1bef61eef (patch)
treeeec4dff465ba290d39c4f0b8badc32fb6bb2f70d /mod/message.php
parent8a10af3bce54141be7e03a96f7a9c2df28c7fa5b (diff)
parentb74a776162b86b6257acf0406e7df4da236c8f09 (diff)
downloadvolse-hubzilla-b3b303f037c2142d0a388dc25b420dd1bef61eef.tar.gz
volse-hubzilla-b3b303f037c2142d0a388dc25b420dd1bef61eef.tar.bz2
volse-hubzilla-b3b303f037c2142d0a388dc25b420dd1bef61eef.zip
Merge branch 'ac'
Diffstat (limited to 'mod/message.php')
-rw-r--r--mod/message.php38
1 files changed, 24 insertions, 14 deletions
diff --git a/mod/message.php b/mod/message.php
index aa8851e46..6fa128808 100644
--- a/mod/message.php
+++ b/mod/message.php
@@ -4,20 +4,7 @@ require_once('include/acl_selectors.php');
require_once('include/message.php');
function message_init(&$a) {
- $tabs = array(
- /*
- array(
- 'label' => t('All'),
- 'url'=> $a->get_baseurl(true) . '/message',
- 'sel'=> ($a->argc == 1),
- ),
- array(
- 'label' => t('Sent'),
- 'url' => $a->get_baseurl(true) . '/message/sent',
- 'sel'=> ($a->argv[1] == 'sent'),
- ),
- */
- );
+ $tabs = array();
$new = array(
'label' => t('New Message'),
'url' => $a->get_baseurl(true) . '/message/new',
@@ -29,6 +16,20 @@ function message_init(&$a) {
'$tabs'=>$tabs,
'$new'=>$new,
));
+ $base = $a->get_baseurl();
+
+ $a->page['htmlhead'] .= '<script src="' . $a->get_baseurl(true) . '/library/jquery_ac/jquery.autocomplete-min.js" ></script>';
+ $a->page['htmlhead'] .= <<< EOT
+
+<script>$(document).ready(function() {
+ var a;
+ a = $("#recip").autocomplete({
+ serviceUrl: '$base/acl'
+ });
+});
+
+</script>
+EOT;
}
@@ -172,6 +173,15 @@ function message_content(&$a) {
$preselect = (isset($a->argv[2])?array($a->argv[2]):false);
$select = contact_select('messageto','message-to-select', $preselect, 4, true, false, false, 10);
+
+// here's sort of where we want to do contact autocomplete
+// comment out the contact selector line just above and use the following one instead,
+// then figure out how to make it do the right thing
+// pictures would be nice, but that didn't seem to work when I tried it
+// (the json backend is found in mod/acl.php)
+
+// $select = '<input type="text" id="recip" name="messageto" value="' . $preselect .'" />';
+
$tpl = get_markup_template('prv_message.tpl');
$o .= replace_macros($tpl,array(
'$header' => t('Send Private Message'),