X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=view%2Fjot-header.tpl;h=6195c5bbc6d4b506c4db89d3cb1374e9060f359e;hb=cdf2fe859f439a9d3689ea946e23d9aef1fb6cac;hp=7e7e393acdb75938b477094adc8e4985d2dd3b77;hpb=020deefba613327a1d8875ba7f2cf9a750be42dd;p=friendica.git diff --git a/view/jot-header.tpl b/view/jot-header.tpl index 7e7e393acd..6195c5bbc6 100644 --- a/view/jot-header.tpl +++ b/view/jot-header.tpl @@ -1,68 +1,83 @@ @@ -70,11 +85,13 @@ tinyMCE.init({ var ispublic = '$ispublic'; $(document).ready(function() { - $("#profile-jot-acl-wrapper").hide(); - $("a#jot-perms-icon").fancybox({ - 'transitionIn' : 'none', - 'transitionOut' : 'none' - }); + /* enable tinymce on focus */ + $("#profile-jot-text").focus(function(){ + if (editor) return; + $(this).val(""); + initEditor(); + }); + var uploader = new window.AjaxUpload( 'wall-image-upload', @@ -168,12 +185,17 @@ tinyMCE.init({ } } + function jotShare(id) { $('#like-rotator-' + id).show(); $.get('share/' + id, function(data) { - tinyMCE.execCommand('mceInsertRawHTML',false,data); - $('#like-rotator-' + id).hide(); - $(window).scrollTop(0); + if (!editor) $("#profile-jot-text").val(""); + initEditor(function(){ + tinyMCE.execCommand('mceInsertRawHTML',false,data); + $('#like-rotator-' + id).hide(); + $(window).scrollTop(0); + }); + }); } @@ -190,8 +212,11 @@ tinyMCE.init({ if(reply && reply.length) { $('#profile-rotator').show(); $.get('parse_url?url=' + reply, function(data) { - tinyMCE.execCommand('mceInsertRawHTML',false,data); - $('#profile-rotator').hide(); + if (!editor) $("#profile-jot-text").val(""); + initEditor(function(){ + tinyMCE.execCommand('mceInsertRawHTML',false,data); + $('#profile-rotator').hide(); + }); }); } }