]> git.mxchange.org Git - friendica.git/blobdiff - view/theme/darkzero/theme.php
Frio: remove header(location) in default.php
[friendica.git] / view / theme / darkzero / theme.php
index dc0da0b167df1bb41e04a597ccf8424f39d1f133..1fe4bf859cd84d42bc93f454ae80396c0b09f44f 100644 (file)
@@ -8,11 +8,12 @@
  * Maintainer: Mike Macgirvin <mike@macgirvin.com>
  */
 
+function darkzero_init(&$a) {
 $a->theme_info = array(
   'extends' => 'duepuntozero',
 );
+set_template_engine($a, 'smarty3');
 
-function darkzero_init(&$a) {
 $a->page['htmlhead'] .= <<< EOT
 <script>
 function insertFormatting(comment,BBcode,id) {
@@ -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
+}