diff options
author | Haakon Meland Eriksen <haakon.eriksen@far.no> | 2014-06-24 19:34:36 +0200 |
---|---|---|
committer | Haakon Meland Eriksen <haakon.eriksen@far.no> | 2014-06-24 19:34:36 +0200 |
commit | b8dc9e855af2d30f33d0f90dc13d8cad0a7b3e70 (patch) | |
tree | 718df6305bcb82c8dcb4b287a7132422e748cdfb /view/tpl/msg-header.tpl | |
parent | c2d520f1be115fb3cb5da2a35eb10146cecee8aa (diff) | |
parent | a92fb0b04c3e6474ec48faf8e4cc65c382e89d66 (diff) | |
download | volse-hubzilla-b8dc9e855af2d30f33d0f90dc13d8cad0a7b3e70.tar.gz volse-hubzilla-b8dc9e855af2d30f33d0f90dc13d8cad0a7b3e70.tar.bz2 volse-hubzilla-b8dc9e855af2d30f33d0f90dc13d8cad0a7b3e70.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'view/tpl/msg-header.tpl')
-rwxr-xr-x[-rw-r--r--] | view/tpl/msg-header.tpl | 61 |
1 files changed, 45 insertions, 16 deletions
diff --git a/view/tpl/msg-header.tpl b/view/tpl/msg-header.tpl index 2d1ea7a61..b6cff7c74 100644..100755 --- a/view/tpl/msg-header.tpl +++ b/view/tpl/msg-header.tpl @@ -1,8 +1,7 @@ - -<script language="javascript" type="text/javascript" src="$baseurl/library/tinymce/jscripts/tiny_mce/tiny_mce_src.js"></script> +<script language="javascript" type="text/javascript" src="{{$baseurl}}/library/tinymce/jscripts/tiny_mce/tiny_mce_src.js"></script> <script language="javascript" type="text/javascript"> -var plaintext = '$editselect'; +var plaintext = '{{$editselect}}'; if(plaintext != 'none') { tinyMCE.init({ @@ -25,7 +24,7 @@ if(plaintext != 'none') { force_br_newlines : true, forced_root_block : '', convert_urls: false, - content_css: "$baseurl/view/custom_tinymce.css", + content_css: "{{$baseurl}}/view/custom_tinymce.css", //Character count theme_advanced_path : false, setup : function(ed) { @@ -46,17 +45,29 @@ else </script> -<script type="text/javascript" src="js/ajaxupload.js" ></script> +<script type="text/javascript" src="view/js/ajaxupload.js" ></script> <script> $(document).ready(function() { var uploader = new window.AjaxUpload( 'prvmail-upload', - { action: 'wall_upload/$nickname', + { action: 'wall_upload/{{$nickname}}', + name: 'userfile', + onSubmit: function(file,ext) { $('#profile-rotator').spin('tiny'); }, + onComplete: function(file,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').show(); }, + onSubmit: function(file,ext) { $('#profile-rotator').spin('tiny'); }, onComplete: function(file,response) { - tinyMCE.execCommand('mceInsertRawHTML',false,response); - $('#profile-rotator').hide(); + addeditortext(response); + $('#profile-rotator').spin(false); } } ); @@ -64,16 +75,23 @@ else }); function jotGetLink() { - reply = prompt("$linkurl"); + reply = prompt("{{$linkurl}}"); if(reply && reply.length) { - $('#profile-rotator').show(); + $('#profile-rotator').spin('tiny'); $.get('parse_url?url=' + reply, function(data) { - tinyMCE.execCommand('mceInsertRawHTML',false,data); - $('#profile-rotator').hide(); + addeditortext(response); + $('#profile-rotator').spin(false); }); } } + function prvmailGetExpiry() { + reply = prompt("{{$expireswhen}}", $('#inp-prvmail-expires').val()); + if(reply && reply.length) { + $('#inp-prvmail-expires').val(reply); + } + } + function linkdropper(event) { var linkFound = event.dataTransfer.types.contains("text/uri-list"); if(linkFound) @@ -85,13 +103,24 @@ else event.target.textContent = reply; event.preventDefault(); if(reply && reply.length) { - $('#profile-rotator').show(); + $('#profile-rotator').spin('tiny'); $.get('parse_url?url=' + reply, function(data) { - tinyMCE.execCommand('mceInsertRawHTML',false,data); - $('#profile-rotator').hide(); + 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> |