X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=view%2Ftheme%2Fdarkzero%2Ftheme.php;h=ceafdf59569571a7cbf4354b3b34bffaf5cdc0d1;hb=0d5b8dfafde4d66c8cd6978ad83e639938aaf3bd;hp=dc0da0b167df1bb41e04a597ccf8424f39d1f133;hpb=e72eaf24086a6f8c8b6f315ca8f404444b02d210;p=friendica.git diff --git a/view/theme/darkzero/theme.php b/view/theme/darkzero/theme.php index dc0da0b167..ceafdf5956 100644 --- a/view/theme/darkzero/theme.php +++ b/view/theme/darkzero/theme.php @@ -11,6 +11,7 @@ $a->theme_info = array( 'extends' => 'duepuntozero', ); +set_template_engine($a, 'smarty3'); function darkzero_init(&$a) { $a->page['htmlhead'] .= <<< EOT @@ -23,7 +24,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) { @@ -44,11 +46,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() { @@ -95,4 +105,4 @@ $('.savedsearchterm').hover( EOT; -} \ No newline at end of file +}