]> git.mxchange.org Git - friendica.git/blobdiff - js/main.js
little stuff - name change, live updates, new network types
[friendica.git] / js / main.js
index 15c5b5d1f19ec643b0311ca87f1c760d9763c83e..b8b89cd9dfca3597ceae4ab898663b79ff10ae2a 100644 (file)
@@ -42,7 +42,7 @@
                        if (e.hasClass("ttbottom")) pos="bottom";
                        if (e.hasClass("ttleft")) pos="left";
                        if (e.hasClass("ttright")) pos="right";
-                       e.tipTip({defaultPosition: pos});
+                       e.tipTip({defaultPosition: pos, edgeOffset: 8});
                });
                
                
                        menu.toggle();
                        return false;
                });
+               
+               // fancyboxes
+               $("a.popupbox").fancybox({
+                       'transitionIn' : 'elastic',
+                       'transitionOut' : 'elastic'
+               });
+               
 
                /* notifications template */
                var notifications_tpl= unescape($("#nav-notifications-template[rel=template]").html());
                        });
                        eSysmsg.children("info").each(function(){
                                text = $(this).text();
-                               $.jGrowl(text, { sticky: false, theme: 'info' });
+                               $.jGrowl(text, { sticky: false, theme: 'info', life: 10000 });
                        });
                        
                });
 
        function NavUpdate() {
 
-               if($('#live-network').length)   { src = 'network'; liveUpdate(); }
-               if($('#live-profile').length)   { src = 'profile'; liveUpdate(); }
-               if($('#live-community').length) { src = 'community'; liveUpdate(); }
-               if($('#live-notes').length)     { src = 'notes'; liveUpdate(); }
-               if($('#live-display').length) { 
-                       if(liking) {
-                               liking = 0;
-                               window.location.href=window.location.href 
-                       }
-               }
-               if($('#live-photos').length)  { 
-                       if(liking) {
-                               liking = 0;
-                               window.location.href=window.location.href 
-                       }
-               }
-
                if(! stopped) {
                        $.get("ping",function(data) {
                                $(data).find('result').each(function() {
                                        // send nav-update event
                                        $('nav').trigger('nav-update', this);
+                                       
+                                       
+                                       // start live update
+
+                                       if($('#live-network').length)   { src = 'network'; liveUpdate(); }
+                                       if($('#live-profile').length)   { src = 'profile'; liveUpdate(); }
+                                       if($('#live-community').length) { src = 'community'; liveUpdate(); }
+                                       if($('#live-notes').length)     { src = 'notes'; liveUpdate(); }
+                                       if($('#live-display').length) {
+                                               if(liking) {
+                                                       liking = 0;
+                                                       window.location.href=window.location.href 
+                                               }
+                                       }
+                                       if($('#live-photos').length) { 
+                                               if(liking) {
+                                                       liking = 0;
+                                                       window.location.href=window.location.href 
+                                               }
+                                       }
+
+                                       
+                                       
+                                       
                                });
                        }) ;
                }
 
                $.get(update_url,function(data) {
                        in_progress = false;
-                       $('.ccollapse-wrapper',data).each(function() {
+                       $('.collapsed-comments',data).each(function() {
                                var ident = $(this).attr('id');
                                var is_hidden = $('#' + ident).is(':hidden');
                                if($('#' + ident).length) {
                                        $('#' + ident + ' ' + '.wall-item-ago').replaceWith($(this).find('.wall-item-ago')); 
                                        if($('#' + ident + ' ' + '.comment-edit-text-empty').length)
                                                $('#' + ident + ' ' + '.wall-item-comment-wrapper').replaceWith($(this).find('.wall-item-comment-wrapper'));
+                                       $('#' + ident + ' ' + '.hide-comments-total').replaceWith($(this).find('.hide-comments-total'));
                                        $('#' + ident + ' ' + '.wall-item-like').replaceWith($(this).find('.wall-item-like'));
                                        $('#' + ident + ' ' + '.wall-item-dislike').replaceWith($(this).find('.wall-item-dislike'));
                                        $('#' + ident + ' ' + '.my-comment-photo').each(function() {