diff options
Diffstat (limited to 'view/js/main.js')
-rw-r--r-- | view/js/main.js | 33 |
1 files changed, 9 insertions, 24 deletions
diff --git a/view/js/main.js b/view/js/main.js index 5f88ea9ca..17ef578be 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -645,12 +645,15 @@ function updateConvItems(mode,data) { } else { $("#nav-" + notifyType + "-menu").html(notifications_all + notifications_mark); - $(data.notify).each(function() { html = notifications_tpl.format(this.notify_link,this.photo,this.name,this.message,this.when,this.class); $("#nav-" + notifyType + "-menu").append(html); }); - + $(".dropdown-menu img[data-src]").each(function(i, el){ + // Replace data-src attribute with src attribute for every image + $(el).attr('src', $(el).data("src")); + $(el).removeAttr("data-src"); + }); } }); @@ -728,27 +731,10 @@ function updateConvItems(mode,data) { return cursor; } - var lockvisible = false; - function lockview(event,id) { - event = event || window.event; - cursor = getPosition(event); - if(lockvisible) { - lockviewhide(); - } - else { - lockvisible = true; - $.get('lockview/' + id, function(data) { - $('#panel').html(data); - $('#panel').css({ 'left': cursor.x + 5 , 'top': cursor.y + 5}); - $('#panel').show(); - }); - } - } - - function lockviewhide() { - lockvisible = false; - $('#panel').hide(); + $.get('lockview/' + id, function(data) { + $('#panel-' + id).html(data); + }); } function post_comment(id) { @@ -1022,7 +1008,7 @@ $(window).scroll(function () { $('#more').show(); } - if($(window).scrollTop() + $(window).height() == $(document).height()) { + if($(window).scrollTop() + $(window).height() > $(document).height() - 100) { if((pageHasMoreContent) && (! loadingPage)) { $('#more').hide(); $('#no-more').hide(); @@ -1032,7 +1018,6 @@ $(window).scroll(function () { loadingPage = true; liveUpdate(); } - } } }); |