diff options
author | friendica <info@friendica.com> | 2013-08-19 21:19:39 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-08-19 21:19:39 -0700 |
commit | cd5fdbcb48a2e05198bb9daaf0753e8218ea4285 (patch) | |
tree | 8a2f57e1b6e99e9fe6b1f961b4d53b077603d046 /view/tpl | |
parent | b9314935e6f85bb0098c651d021ce9bdc2753ecb (diff) | |
download | volse-hubzilla-cd5fdbcb48a2e05198bb9daaf0753e8218ea4285.tar.gz volse-hubzilla-cd5fdbcb48a2e05198bb9daaf0753e8218ea4285.tar.bz2 volse-hubzilla-cd5fdbcb48a2e05198bb9daaf0753e8218ea4285.zip |
email attachments (and fix email photos)
Diffstat (limited to 'view/tpl')
-rwxr-xr-x | view/tpl/msg-header.tpl | 29 | ||||
-rwxr-xr-x | view/tpl/prv_message.tpl | 6 |
2 files changed, 32 insertions, 3 deletions
diff --git a/view/tpl/msg-header.tpl b/view/tpl/msg-header.tpl index 0be288709..5e2597605 100755 --- a/view/tpl/msg-header.tpl +++ b/view/tpl/msg-header.tpl @@ -54,7 +54,19 @@ else name: 'userfile', onSubmit: function(file,ext) { $('#profile-rotator').spin('tiny'); }, onComplete: function(file,response) { - tinyMCE.execCommand('mceInsertRawHTML',false,response); + addeditortext(response); + $('#profile-rotator').spin(false); + } + } + ); + + var file_uploader = new window.AjaxUpload( + 'prvmail-attach', + { action: 'wall_attach/{{$nickname}}', + name: 'userfile', + onSubmit: function(file,ext) { $('#profile-rotator').spin('tiny'); }, + onComplete: function(file,response) { + addeditortext(response); $('#profile-rotator').spin(false); } } @@ -67,7 +79,7 @@ else if(reply && reply.length) { $('#profile-rotator').spin('tiny'); $.get('parse_url?url=' + reply, function(data) { - tinyMCE.execCommand('mceInsertRawHTML',false,data); + addeditortext(response); $('#profile-rotator').spin(false); }); } @@ -86,11 +98,22 @@ else if(reply && reply.length) { $('#profile-rotator').spin('tiny'); $.get('parse_url?url=' + reply, function(data) { - tinyMCE.execCommand('mceInsertRawHTML',false,data); + addeditortext(response); $('#profile-rotator').spin(false); }); } } + function addeditortext(data) { + if(plaintext == 'none') { + var currentText = $("#prvmail-text").val(); + $("#prvmail-text").val(currentText + data); + } + else + tinyMCE.execCommand('mceInsertRawHTML',false,data); + } + + + </script> diff --git a/view/tpl/prv_message.tpl b/view/tpl/prv_message.tpl index 2ddf75544..164ba0c6d 100755 --- a/view/tpl/prv_message.tpl +++ b/view/tpl/prv_message.tpl @@ -26,6 +26,12 @@ <div id="prvmail-upload-wrapper" > <div id="prvmail-upload" class="icon border camera" title="{{$upload}}" ></div> </div> + + <div id="prvmail-attach-wrapper" > + <div id="prvmail-attach" class="icon attach" title="{{$attach}}" ></div> + </div> + + <div id="prvmail-link-wrapper" > <div id="prvmail-link" class="icon border link" title="{{$insert}}" onclick="jotGetLink();" ></div> </div> |