]> git.mxchange.org Git - friendica.git/blobdiff - view/theme/darkzero/theme.php
Implement Smarty3
[friendica.git] / view / theme / darkzero / theme.php
index e6b469bff00f08d2d5815f749c44046dd718d21b..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
@@ -45,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() {
@@ -96,4 +105,4 @@ $('.savedsearchterm').hover(
 
 </script>
 EOT;
-}
\ No newline at end of file
+}