X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=js%2Fmain.js;h=b8b89cd9dfca3597ceae4ab898663b79ff10ae2a;hb=b795ce4fe7c952600ed3520d6822006a2190d4f8;hp=15c5b5d1f19ec643b0311ca87f1c760d9763c83e;hpb=1aba538c96628468b84136386496ccc69050e810;p=friendica.git diff --git a/js/main.js b/js/main.js index 15c5b5d1f1..b8b89cd9df 100644 --- a/js/main.js +++ b/js/main.js @@ -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}); }); @@ -78,6 +78,13 @@ menu.toggle(); return false; }); + + // fancyboxes + $("a.popupbox").fancybox({ + 'transitionIn' : 'elastic', + 'transitionOut' : 'elastic' + }); + /* notifications template */ var notifications_tpl= unescape($("#nav-notifications-template[rel=template]").html()); @@ -133,7 +140,7 @@ }); eSysmsg.children("info").each(function(){ text = $(this).text(); - $.jGrowl(text, { sticky: false, theme: 'info' }); + $.jGrowl(text, { sticky: false, theme: 'info', life: 10000 }); }); }); @@ -168,28 +175,35 @@ 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 + } + } + + + + }); }) ; } @@ -210,7 +224,7 @@ $.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) { @@ -232,6 +246,7 @@ $('#' + 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() {