From 38d50cabd4b3db859c5ac33f02760b1b00a993e5 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 18 Nov 2014 15:13:37 -0800 Subject: private mail buttons --- mod/mail.php | 8 ++++++-- mod/wall_upload.php | 1 + view/tpl/msg-header.tpl | 28 ++++++++++++++-------------- view/tpl/prv_message.tpl | 14 +++++++------- 4 files changed, 28 insertions(+), 23 deletions(-) diff --git a/mod/mail.php b/mod/mail.php index dacb181c5..6c778b956 100644 --- a/mod/mail.php +++ b/mod/mail.php @@ -113,6 +113,7 @@ function mail_content(&$a) { } $channel = $a->get_channel(); + head_set_icon($channel['xchan_photo_s']); $cipher = get_pconfig(local_user(),'system','default_cipher'); @@ -163,13 +164,16 @@ function mail_content(&$a) { $tpl = get_markup_template('msg-header.tpl'); - $a->page['htmlhead'] .= replace_macros($tpl, array( + $header = replace_macros($tpl, array( '$baseurl' => $a->get_baseurl(true), '$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'), '$nickname' => $channel['channel_address'], '$linkurl' => t('Please enter a link URL:'), '$expireswhen' => t('Expires YYYY-MM-DD HH:MM') )); + + $a->page['htmlhead'] .= $header; + $preselect = (isset($a->argv[2])?array($a->argv[2]):false); $prename = $preurl = $preid = ''; @@ -276,7 +280,7 @@ function mail_content(&$a) { $tpl = get_markup_template('msg-header.tpl'); $a->page['htmlhead'] .= replace_macros($tpl, array( - '$nickname' => $channel['channel_addr'], + '$nickname' => $channel['channel_address'], '$baseurl' => $a->get_baseurl(true), '$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'), '$linkurl' => t('Please enter a link URL:'), diff --git a/mod/wall_upload.php b/mod/wall_upload.php index 97840a180..7ed1859a8 100644 --- a/mod/wall_upload.php +++ b/mod/wall_upload.php @@ -8,6 +8,7 @@ require_once('include/photos.php'); function wall_upload_post(&$a) { + $using_api = ((x($_FILES,'media')) ? true : false); if($using_api) { diff --git a/view/tpl/msg-header.tpl b/view/tpl/msg-header.tpl index 503e4c8cc..85fa51b0a 100755 --- a/view/tpl/msg-header.tpl +++ b/view/tpl/msg-header.tpl @@ -52,10 +52,10 @@ else 'prvmail-upload-wrapper', { action: 'wall_upload/{{$nickname}}', name: 'userfile', - onSubmit: function(file,ext) { $('#profile-rotator').spin('tiny'); }, + onSubmit: function(file,ext) { $('#prvmail-rotator').spin('tiny'); }, onComplete: function(file,response) { - addeditortext(response); - $('#profile-rotator').spin(false); + addmailtext(response); + $('#prvmail-rotator').spin(false); } } ); @@ -64,23 +64,23 @@ else 'prvmail-attach-wrapper', { action: 'wall_attach/{{$nickname}}', name: 'userfile', - onSubmit: function(file,ext) { $('#profile-rotator').spin('tiny'); }, + onSubmit: function(file,ext) { $('#prvmail-rotator').spin('tiny'); }, onComplete: function(file,response) { - addeditortext(response); - $('#profile-rotator').spin(false); + addmailtext(response); + $('#prvmail-rotator').spin(false); } } ); }); - function jotGetLink() { + function prvmailJotGetLink() { reply = prompt("{{$linkurl}}"); if(reply && reply.length) { - $('#profile-rotator').spin('tiny'); + $('#prvmail-rotator').spin('tiny'); $.get('parse_url?url=' + reply, function(data) { - addeditortext(response); - $('#profile-rotator').spin(false); + addmailtext(data); + $('#prvmail-rotator').spin(false); }); } } @@ -103,15 +103,15 @@ else event.target.textContent = reply; event.preventDefault(); if(reply && reply.length) { - $('#profile-rotator').spin('tiny'); + $('#prvmail-rotator').spin('tiny'); $.get('parse_url?url=' + reply, function(data) { - addeditortext(response); - $('#profile-rotator').spin(false); + addmailtext(data); + $('#prvmail-rotator').spin(false); }); } } - function addeditortext(data) { + function addmailtext(data) { if(plaintext == 'none') { var currentText = $("#prvmail-text").val(); $("#prvmail-text").val(currentText + data); diff --git a/view/tpl/prv_message.tpl b/view/tpl/prv_message.tpl index 709943541..c6f393aa4 100755 --- a/view/tpl/prv_message.tpl +++ b/view/tpl/prv_message.tpl @@ -34,21 +34,21 @@ - {{if $feature_expire}} - {{/if}} {{if $feature_encrypt}} - {{/if}}
- +
-- cgit v1.2.3