]> git.mxchange.org Git - friendica.git/blobdiff - view/theme/darkzero/theme.php
Implement Smarty3
[friendica.git] / view / theme / darkzero / theme.php
index dc0da0b167df1bb41e04a597ccf8424f39d1f133..9fa248ceacba6d36a928e30013c1531b8f9781ff 100644 (file)
@@ -11,6 +11,7 @@
 $a->theme_info = array(
   'extends' => 'duepuntozero',
 );
+$a->theme['template_engine'] = '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(
 
 </script>
 EOT;
-}
\ No newline at end of file
+}