aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-05-06 19:55:39 -0700
committerfriendica <info@friendica.com>2012-05-06 19:55:39 -0700
commit851264161f1b0e638a818a0ebfa80feeb46dfa44 (patch)
tree15981ef51d89d91977fa2e55055363878d19cf83 /mod
parent57920849c4138920b5715931a268dd2a55c76003 (diff)
downloadvolse-hubzilla-851264161f1b0e638a818a0ebfa80feeb46dfa44.tar.gz
volse-hubzilla-851264161f1b0e638a818a0ebfa80feeb46dfa44.tar.bz2
volse-hubzilla-851264161f1b0e638a818a0ebfa80feeb46dfa44.zip
mail autcomplete testing
Diffstat (limited to 'mod')
-rw-r--r--mod/message.php33
1 files changed, 18 insertions, 15 deletions
diff --git a/mod/message.php b/mod/message.php
index aa8851e46..70b85b84c 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 = $("#messageto").autocomplete({
+ serviceUrl: '$base/acl'
+ });
+});
+
+</script>
+EOT;
}
@@ -171,7 +172,9 @@ 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);
+// $select = contact_select('messageto','message-to-select', $preselect, 4, true, false, false, 10);
+ $select = '<input type="text" id="messageto" name="messageto" value="' . $preselect .'" />';
+
$tpl = get_markup_template('prv_message.tpl');
$o .= replace_macros($tpl,array(
'$header' => t('Send Private Message'),