From 5ba39fef9af977fe9b92fef1b6d582138aee7d4b Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 2 Oct 2015 17:51:37 +0200 Subject: private mail compositor changes --- mod/mail.php | 14 +++-- view/css/mod_mail.css | 33 ++---------- view/theme/redbasic/css/style.css | 1 + view/tpl/mail_conv.tpl | 1 + view/tpl/msg-header.tpl | 11 ---- view/tpl/prv_message.tpl | 111 +++++++++++++++++++++----------------- 6 files changed, 74 insertions(+), 97 deletions(-) diff --git a/mod/mail.php b/mod/mail.php index 525127a71..54663b3ae 100644 --- a/mod/mail.php +++ b/mod/mail.php @@ -226,10 +226,11 @@ function mail_content(&$a) { // the ugly select box - $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); $tpl = get_markup_template('prv_message.tpl'); $o .= replace_macros($tpl,array( + '$new' => true, '$header' => t('Send Private Message'), '$to' => t('To:'), '$showinputs' => 'true', @@ -347,10 +348,6 @@ function mail_content(&$a) { $recp = (($message['from_xchan'] === $channel['channel_hash']) ? 'to' : 'from'); -// FIXME - move this HTML to template - - $select = $message[$recp]['xchan_name'] . ''; - $parent = ''; $tpl = get_markup_template('mail_display.tpl'); $o = replace_macros($tpl, array( '$mailbox' => $mailbox, @@ -366,14 +363,15 @@ function mail_content(&$a) { // reply '$header' => t('Send Reply'), '$to' => t('To:'), - '$showinputs' => '', + '$reply' => true, '$subject' => t('Subject:'), '$subjtxt' => $message['title'], '$readonly' => 'readonly="readonly"', - '$yourmessage' => t('Your message:'), + '$yourmessage' => sprintf(t('Your message for %s'), $message[$recp]['xchan_name']), '$text' => '', '$select' => $select, - '$parent' => $parent, + '$parent' => $message['parent_mid'], + '$recphash' => $message[$recp]['xchan_hash'], '$upload' => t('Upload photo'), '$attach' => t('Attach file'), '$insert' => t('Insert web link'), diff --git a/view/css/mod_mail.css b/view/css/mod_mail.css index cabfb299f..5fd646765 100644 --- a/view/css/mod_mail.css +++ b/view/css/mod_mail.css @@ -1,32 +1,3 @@ -/* message/new */ - -#prvmail-to-label, -#prvmail-subject-label, -#prvmail-expires-label, -#prvmail-message-label { - margin-bottom: 10px; - margin-top: 20px; -} - -#prvmail-submit { - float: left; - margin-top: 10px; - margin-right: 30px; -} - -#prvmail-upload-wrapper, -#prvmail-attach-wrapper, -#prvmail-link-wrapper, -#prvmail-expire-wrapper, -#prvmail-encrypt-wrapper, -#prvmail-rotator-wrapper { - float: left; - margin-top: 10px; - cursor: pointer; -} - -/* message/id */ - .mail-conv-sender { float: left; margin-right: 10px; @@ -49,3 +20,7 @@ .mail-conv-body img { max-width: 100%; } + +#prvmail-rotator { + margin: 15px; +} diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index 2ff6c1eb4..b51fea6cf 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -1722,6 +1722,7 @@ img.mail-conv-sender-photo { } .wall-item-content, +.mail-conv-body, .page-body { font-size: $font_size; clear: both; diff --git a/view/tpl/mail_conv.tpl b/view/tpl/mail_conv.tpl index 9c0fda483..4f54f1a6a 100755 --- a/view/tpl/mail_conv.tpl +++ b/view/tpl/mail_conv.tpl @@ -11,6 +11,7 @@
{{$mail.body}} +