X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=view%2Ftheme%2Ffrio%2Ftemplates%2Fjot-header.tpl;h=7c8d502de6c82b29ed189751183fc54cb7c337bd;hb=ae905cbd1b67b2aeae33a64302368d285f63732d;hp=6d481451185c6c8aa9cdf633599141df742ebb56;hpb=f79a7bc4556533b4bc9518dffa35bbb0e3cdf7b9;p=friendica.git diff --git a/view/theme/frio/templates/jot-header.tpl b/view/theme/frio/templates/jot-header.tpl index 6d48145118..7c8d502de6 100644 --- a/view/theme/frio/templates/jot-header.tpl +++ b/view/theme/frio/templates/jot-header.tpl @@ -127,7 +127,7 @@ function initEditor(cb){ function enableOnUser(){ if (editor) return; - $(this).val(""); + //$(this).val(""); initEditor(); } @@ -146,7 +146,11 @@ function enableOnUser(){ $("#profile-jot-text").focus(enableOnUser); $("#profile-jot-text").click(enableOnUser); - + // When clicking on a forum in acl we should remove the profile jot textarea + // default value before inserting the forum mention + $("body").on('click', '#jot-modal .acl-list-item.forum', function(){ + jotTextOpenUI(document.getElementById("profile-jot-text")); + }); /* show images / file browser window @@ -376,8 +380,14 @@ function enableOnUser(){ function addeditortext(data) { if(plaintext == 'none') { + // get the textfield + var textfield = document.getElementById("profile-jot-text"); + // check if the textfield does have the default-value + jotTextOpenUI(textfield); + // save already existent content var currentText = $("#profile-jot-text").val(); - $("#profile-jot-text").val(currentText + data); + //insert the data as new value + textfield.value = currentText + data; } else tinyMCE.execCommand('mceInsertRawHTML',false,data); @@ -390,10 +400,9 @@ function enableOnUser(){ jotcache = $("#profile-jot-form"); modal - .find('#jot-modal-body') + .find('#jot-modal-content') .append(jotcache) - .modal.show - ; + .modal.show; } // the following functions show/hide the specific jot content @@ -426,5 +435,6 @@ function enableOnUser(){ $(function() {Dialog.showJot();}); } +