X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=view%2Ftheme%2Fduepuntozero%2Ftheme.php;h=189628b0287acb06e1b7e1949a177b80d303b64a;hb=2abbd1dc19680fcfc00c841b6a73a97a297055b9;hp=8c7e6c6072b02c568cea12afd63f3bb4c762a2c8;hpb=0116426a0eccc81382a670989032b0a095a65a20;p=friendica.git diff --git a/view/theme/duepuntozero/theme.php b/view/theme/duepuntozero/theme.php index 8c7e6c6072..189628b028 100644 --- a/view/theme/duepuntozero/theme.php +++ b/view/theme/duepuntozero/theme.php @@ -12,7 +12,8 @@ function insertFormatting(comment,BBcode,id) { $("#comment-edit-text-" + id).addClass("comment-edit-text-full"); $("#comment-edit-text-" + id).removeClass("comment-edit-text-empty"); openMenu("comment-edit-submit-wrapper-" + id); - } + $("#comment-edit-text-" + id).val(tmpStr); + } textarea = document.getElementById("comment-edit-text-" +id); if (document.selection) { @@ -33,11 +34,19 @@ function insertFormatting(comment,BBcode,id) { return true; } -function cmtBbOpen(id) { - $(".comment-edit-bb-" + id).show(); +function cmtBbOpen(comment, id) { + if($(comment).hasClass('comment-edit-text-full')) { + $(".comment-edit-bb-" + id).show(); + return true; + } + return false; } -function cmtBbClose(id) { - $(".comment-edit-bb-" + id).hide(); +function cmtBbClose(comment, id) { + if($(comment).hasClass('comment-edit-text-empty')) { + $(".comment-edit-bb-" + id).hide(); + return true; + } + return false; } $(document).ready(function() {