diff options
author | Mario Vavti <mario@mariovavti.com> | 2015-10-05 12:26:04 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2015-10-05 12:26:04 +0200 |
commit | 05050381d3d662fd880cd04142cf6ba399cbf104 (patch) | |
tree | e7363a6c8b7456254f958312b9c1e656561717d4 /view | |
parent | 95d6d2644f25b208ce087ed48578be580973745e (diff) | |
download | volse-hubzilla-05050381d3d662fd880cd04142cf6ba399cbf104.tar.gz volse-hubzilla-05050381d3d662fd880cd04142cf6ba399cbf104.tar.bz2 volse-hubzilla-05050381d3d662fd880cd04142cf6ba399cbf104.zip |
bring our bbcode tools to private mail
Diffstat (limited to 'view')
-rw-r--r-- | view/js/main.js | 4 | ||||
-rwxr-xr-x | view/tpl/jot.tpl | 10 | ||||
-rwxr-xr-x | view/tpl/msg-header.tpl | 15 | ||||
-rwxr-xr-x | view/tpl/prv_message.tpl | 72 |
4 files changed, 77 insertions, 24 deletions
diff --git a/view/js/main.js b/view/js/main.js index d3c7175d0..34d6bf475 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -112,12 +112,12 @@ function insertbbcomment(comment, BBcode, id) { return true; } -function inserteditortag(BBcode) { +function inserteditortag(BBcode, id) { // allow themes to override this if(typeof(insertEditorFormatting) != 'undefined') return(insertEditorFormatting(BBcode)); - textarea = document.getElementById('profile-jot-text'); + textarea = document.getElementById(id); if (document.selection) { textarea.focus(); selected = document.selection.createRange(); diff --git a/view/tpl/jot.tpl b/view/tpl/jot.tpl index 100dd15b9..ea68368aa 100755 --- a/view/tpl/jot.tpl +++ b/view/tpl/jot.tpl @@ -47,19 +47,19 @@ <div id="profile-jot-submit-wrapper" class="jothidden"> <div id="profile-jot-submit-left" class="btn-toolbar pull-left"> <div class="btn-group"> - <button id="main-editor-bold" class="btn btn-default btn-sm" title="{{$bold}}" onclick="inserteditortag('b'); return false;"> + <button id="main-editor-bold" class="btn btn-default btn-sm" title="{{$bold}}" onclick="inserteditortag('b', 'profile-jot-text'); return false;"> <i class="icon-bold jot-icons"></i> </button> - <button id="main-editor-italic" class="btn btn-default btn-sm" title="{{$italic}}" onclick="inserteditortag('i'); return false;"> + <button id="main-editor-italic" class="btn btn-default btn-sm" title="{{$italic}}" onclick="inserteditortag('i', 'profile-jot-text'); return false;"> <i class="icon-italic jot-icons"></i> </button> - <button id="main-editor-underline" class="btn btn-default btn-sm" title="{{$underline}}" onclick="inserteditortag('u'); return false;"> + <button id="main-editor-underline" class="btn btn-default btn-sm" title="{{$underline}}" onclick="inserteditortag('u', 'profile-jot-text'); return false;"> <i class="icon-underline jot-icons"></i> </button> - <button id="main-editor-quote" class="btn btn-default btn-sm" title="{{$quote}}" onclick="inserteditortag('quote'); return false;"> + <button id="main-editor-quote" class="btn btn-default btn-sm" title="{{$quote}}" onclick="inserteditortag('quote', 'profile-jot-text'); return false;"> <i class="icon-quote-left jot-icons"></i> </button> - <button id="main-editor-code" class="btn btn-default btn-sm" title="{{$code}}" onclick="inserteditortag('code'); return false;"> + <button id="main-editor-code" class="btn btn-default btn-sm" title="{{$code}}" onclick="inserteditortag('code', 'profile-jot-text'); return false;"> <i class="icon-terminal jot-icons"></i> </button> </div> diff --git a/view/tpl/msg-header.tpl b/view/tpl/msg-header.tpl index 593b3652e..3407e152c 100755 --- a/view/tpl/msg-header.tpl +++ b/view/tpl/msg-header.tpl @@ -57,10 +57,23 @@ else onComplete: function(file,response) { addmailtext(response); $('#prvmail-rotator').spin(false); - } + } + } + ); + + var file_uploader_sub = new window.AjaxUpload( + 'prvmail-attach-sub', + { action: 'wall_attach/{{$nickname}}', + name: 'userfile', + onSubmit: function(file,ext) { $('#prvmail-rotator').spin('tiny'); }, + onComplete: function(file,response) { + addmailtext(response); + $('#prvmail-rotator').spin(false); + } } ); + }); function prvmailJotGetLink() { diff --git a/view/tpl/prv_message.tpl b/view/tpl/prv_message.tpl index c31c311cc..b0ea8b753 100755 --- a/view/tpl/prv_message.tpl +++ b/view/tpl/prv_message.tpl @@ -38,23 +38,63 @@ <div id="prvmail-submit" class="pull-right"> <button class="btn btn-primary btn-sm" type="submit" id="prvmail-submit" name="submit" value="{{$submit}}">{{$submit}}</button> </div> - <div id="prvmail-tools" class="btn-group pull-left"> - <button id="prvmail-attach-wrapper" class="btn btn-default btn-sm" > - <i id="prvmail-attach" class="icon-paper-clip jot-icons" title="{{$attach}}"></i> - </button> - <button id="prvmail-link-wrapper" class="btn btn-default btn-sm" onclick="prvmailJotGetLink(); return false;" > - <i id="prvmail-link" class="icon-link jot-icons" title="{{$insert}}" ></i> - </button> - {{if $feature_expire}} - <button id="prvmail-expire-wrapper" class="btn btn-default btn-sm" onclick="prvmailGetExpiry();return false;" > - <i id="prvmail-expires" class="icon-eraser jot-icons" title="{{$expires}}" ></i> - </button> - {{/if}} - {{if $feature_encrypt}} - <button id="prvmail-encrypt-wrapper" class="btn btn-default btn-sm" onclick="red_encrypt('{{$cipher}}','#prvmail-text',$('#prvmail-text').val());return false;"> - <i id="prvmail-encrypt" class="icon-key jot-icons" title="{{$encrypt}}" ></i> - </button> + <div id="prvmail-tools" class="btn-toolbar pull-left"> + <div class="btn-group"> + <button id="main-editor-bold" class="btn btn-default btn-sm" title="{{$bold}}" onclick="inserteditortag('b', 'prvmail-text'); return false;"> + <i class="icon-bold jot-icons"></i> + </button> + <button id="main-editor-italic" class="btn btn-default btn-sm" title="{{$italic}}" onclick="inserteditortag('i', 'prvmail-text'); return false;"> + <i class="icon-italic jot-icons"></i> + </button> + <button id="main-editor-underline" class="btn btn-default btn-sm" title="{{$underline}}" onclick="inserteditortag('u', 'prvmail-text'); return false;"> + <i class="icon-underline jot-icons"></i> + </button> + <button id="main-editor-quote" class="btn btn-default btn-sm" title="{{$quote}}" onclick="inserteditortag('quote', 'prvmail-text'); return false;"> + <i class="icon-quote-left jot-icons"></i> + </button> + <button id="main-editor-code" class="btn btn-default btn-sm" title="{{$code}}" onclick="inserteditortag('code', 'prvmail-text'); return false;"> + <i class="icon-terminal jot-icons"></i> + </button> + </div> + <div class="btn-group hidden-xs"> + <button id="prvmail-attach-wrapper" class="btn btn-default btn-sm" > + <i id="prvmail-attach" class="icon-paper-clip jot-icons" title="{{$attach}}"></i> + </button> + <button id="prvmail-link-wrapper" class="btn btn-default btn-sm" onclick="prvmailJotGetLink(); return false;" > + <i id="prvmail-link" class="icon-link jot-icons" title="{{$insert}}" ></i> + </button> + </div> + {{if $feature_expire || $feature_encrypt}} + <div class="btn-group hidden-sm hidden-xs"> + {{if $feature_expire}} + <button id="prvmail-expire-wrapper" class="btn btn-default btn-sm" onclick="prvmailGetExpiry();return false;" > + <i id="prvmail-expires" class="icon-eraser jot-icons" title="{{$expires}}" ></i> + </button> + {{/if}} + {{if $feature_encrypt}} + <button id="prvmail-encrypt-wrapper" class="btn btn-default btn-sm" onclick="red_encrypt('{{$cipher}}','#prvmail-text',$('#prvmail-text').val());return false;"> + <i id="prvmail-encrypt" class="icon-key jot-icons" title="{{$encrypt}}" ></i> + </button> + {{/if}} + </div> {{/if}} + + <div class="btn-group visible-xs visible-sm"> + <button type="button" id="more-tools" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" aria-expanded="false"> + <i id="more-tools-icon" class="icon-caret-down jot-icons"></i> + </button> + <ul class="dropdown-menu dropdown-menu-right" role="menu"> + <li class="visible-xs"><a href="#" id="prvmail-attach-sub"><i class="icon-paper-clip"></i> {{$attach}}</a></li> + <li class="visible-xs"><a href="#" onclick="prvmailJotGetLink(); return false;" ><i class="icon-link"></i> {{$insert}}</a></li> + {{if $feature_expire || $feature_encrypt}} + <li class="divider visible-xs"></li> + <li class="visible-sm visible-xs"><a href="#" onclick="prvmailGetExpiry(); return false;"><i id="prvmail-expires" class="icon-eraser"></i> {{$expires}}</a></li> + <li class="visible-sm visible-xs"><a href="#" onclick="red_encrypt('{{$cipher}}','#prvmail-text',$('#prvmail-text').val()); return false;"><i class="icon-key"></i> {{$encrypt}}</a></li> + {{/if}} + </ul> + </div> + + </div> <div id="prvmail-rotator-wrapper" class="pull-left"> <div id="prvmail-rotator"></div> |