diff options
| author | 2013-10-07 21:32:49 +0200 | |
|---|---|---|
| committer | 2013-10-07 21:32:49 +0200 | |
| commit | 381df3aea425338455ac1e3534105cadf44182d9 (patch) | |
| tree | b486c1cd694747586e945342a9461196cc9f5d4c /app/views/javascript | |
| parent | 3e9c3d7c4329a9cd0ffcb7b61502c8f2f66bc96e (diff) | |
| parent | 1b8b72b81d1a1648bdfdd8d98e20c07556a6bc2d (diff) | |
Merge branch 'patch-1' of github.com:Alkarex/FreshRSS into Alkarex-patch-1
Diffstat (limited to 'app/views/javascript')
| -rw-r--r-- | app/views/javascript/main.phtml | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/app/views/javascript/main.phtml b/app/views/javascript/main.phtml index 46e44783d..8ff3ec54b 100644 --- a/app/views/javascript/main.phtml +++ b/app/views/javascript/main.phtml @@ -48,21 +48,27 @@ function toggleContent (new_active, old_active) { relative_move = true; } + var new_pos = new_active.position ().top, + old_scroll = $(box_to_move).scrollTop (), + new_scroll = old_scroll; if (hide_posts) { old_active.children (".flux_content").toggle (0); - var new_pos = new_active.position ().top; if(relative_move) { - new_pos += $(box_to_move).scrollTop(); + new_pos += old_scroll; } if (old_active[0] != new_active[0]) { new_active.children (".flux_content").toggle (0, function () { - $(box_to_move).scrollTop (new_pos); + new_scroll = $(box_to_move).scrollTop (new_pos).scrollTop (); }); } } else { - $(box_to_move).scrollTop (new_active.position ().top); + new_scroll = $(box_to_move).scrollTop (new_pos).scrollTop (); + } + + if ((new_scroll === old_scroll) && $.fn.lazyload) { + $(window).trigger ("scroll"); //When no scroll was done, generate fake scroll event for LazyLoad to load images } <?php if ($mark['article'] == 'yes') { ?> |
