diff options
author | friendica <info@friendica.com> | 2013-01-05 21:07:04 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-01-05 21:07:04 -0800 |
commit | a07500b5278bff7b05920378fd1ff352accdd3fe (patch) | |
tree | b378b9856019fb733d51ae13e3a8fe59d003896a | |
parent | 364e33e4f1a938c87e10606f8fb72ba0524dcb7e (diff) | |
download | volse-hubzilla-a07500b5278bff7b05920378fd1ff352accdd3fe.tar.gz volse-hubzilla-a07500b5278bff7b05920378fd1ff352accdd3fe.tar.bz2 volse-hubzilla-a07500b5278bff7b05920378fd1ff352accdd3fe.zip |
structural cleanup of mod_message
-rw-r--r-- | mod/message.php | 43 | ||||
-rw-r--r-- | view/js/mod_message.js | 12 |
2 files changed, 23 insertions, 32 deletions
diff --git a/mod/message.php b/mod/message.php index e3a67b23e..3e88362a0 100644 --- a/mod/message.php +++ b/mod/message.php @@ -4,39 +4,18 @@ require_once('include/acl_selectors.php'); require_once('include/message.php'); require_once('include/zot.php'); -function message_init(&$a) { - $tabs = array(); - $new = array( - 'label' => t('New Message'), - 'url' => $a->get_baseurl(true) . '/message/new', - 'sel'=> (argv(1) == 'new'), - ); - - $tpl = get_markup_template('message_side.tpl'); - $a->page['aside'] = replace_macros($tpl, array( - '$tabs'=>$tabs, - '$new'=>$new, - )); - $base = $a->get_baseurl(); - - $a->page['htmlhead'] .= <<< EOT -<script>$(document).ready(function() { - var a; - a = $("#recip").autocomplete({ - serviceUrl: '$base/acl', - minChars: 2, - width: 350, - onSelect: function(value,data) { - $("#recip-complete").val(data); - } - }); +function message_aside(&$a) { -}); + $a->set_widget('newmessage',replace_macros(get_markup_template('message_side.tpl'), array( + '$tabs'=> array(), + '$new'=>array( + 'label' => t('New Message'), + 'url' => $a->get_baseurl(true) . '/message/new', + 'sel'=> (argv(1) == 'new'), + ) + ))); -</script> -EOT; - } function message_post(&$a) { @@ -437,7 +416,7 @@ function message_content(&$a) { } -dbg(1); + $c = q("select * from xchan where xchan_hash in (" . implode(',',$chans) . ")"); $r = q("UPDATE `mail` SET mail_flags = (mail_flags ^ %d) where not (mail_flags & %d) and parent_uri = '%s' AND channel_id = %d", @@ -446,7 +425,7 @@ dbg(1); dbesc($r[0]['parent_uri']), intval(local_user()) ); -dbg(0); + require_once("include/bbcode.php"); $tpl = get_markup_template('msg-header.tpl'); diff --git a/view/js/mod_message.js b/view/js/mod_message.js new file mode 100644 index 000000000..e3318ce6b --- /dev/null +++ b/view/js/mod_message.js @@ -0,0 +1,12 @@ +$(document).ready(function() { + var a; + a = $("#recip").autocomplete({ + serviceUrl: baseurl + '/acl', + minChars: 2, + width: 350, + onSelect: function(value,data) { + $("#recip-complete").val(data); + } + }); + +}); |