]> git.mxchange.org Git - friendica.git/blobdiff - view/theme/quattro/theme.php
bbcode: rearrange shared links - can only be made standard, when all themes support...
[friendica.git] / view / theme / quattro / theme.php
index 5cb373eefe85f8609f305fc716c4b0d88a7a9198..167ebc75383f1e86c13349f38c4a773273da13b5 100644 (file)
@@ -1,17 +1,49 @@
 <?php
 /**
  * Name: Quattro
- * Version: 0.5
+ * Version: 0.6
  * Author: Fabio <http://kirgroup.com/profile/fabrixxm>
  * Maintainer: Fabio <http://kirgroup.com/profile/fabrixxm>
- * Maintainer: Tobias <https://diekershoff.homeunix.net/friendika/profile/tobias>
+ * Maintainer: Tobias <https://diekershoff.homeunix.net/friendica/profile/tobias>
  */
  
+function quattro_init(&$a) {
 $a->theme_info = array();
+set_template_engine($a, 'smarty3');
 
-function quattro_init(&$a) {
+
+$a->page['htmlhead'] .= '<script src="'.$a->get_baseurl().'/view/theme/quattro/tinycon.min.js"></script>';
 $a->page['htmlhead'] .= <<< EOT
 <script>
+$(document).ready(function(){
+    $('nav').bind('nav-update', function(e,data){
+        var notifCount = $(data).find('notif').attr('count');
+        var intro = $(data).find('intro').text();
+        var mail = $(data).find('mail').text();
+        
+        console.log(intro,mail);
+        
+        if (notifCount > 0 ) {
+            Tinycon.setBubble(notifCount);
+        } else {
+            Tinycon.setBubble('');
+        }
+        
+        if (intro>0){
+                       $("#nav-introductions-link").addClass("on");
+               } else {
+                       $("#nav-introductions-link").removeClass("on");
+               }
+               
+        if (mail>0){
+                       $("#nav-messages-link").addClass("on");
+               } else {
+                       $("#nav-messages-link").removeClass("on");
+               }
+               
+    });
+});        
+
 function insertFormatting(comment,BBcode,id) {
        
                var tmpStr = $("#comment-edit-text-" + id).val();
@@ -42,11 +74,21 @@ function insertFormatting(comment,BBcode,id) {
        return true;
 }
 
+function showThread(id) {
+       $("#collapsed-comments-" + id).show()
+       $("#collapsed-comments-" + id + " .collapsed-comments").show()
+}
+function hideThread(id) {
+       $("#collapsed-comments-" + id).hide()
+       $("#collapsed-comments-" + id + " .collapsed-comments").hide()
+}
+
+
 function cmtBbOpen(id) {
-       $(".comment-edit-bb-" + id).show();
+       $("#comment-edit-bb-" + id).show();
 }
-function cmtBbClose(comment, id) {
-       $(".comment-edit-bb-" + id).hide();
+function cmtBbClose(id) {
+       $("#comment-edit-bb-" + id).hide();
 }
 $(document).ready(function() {