diff options
| author | 2013-08-21 14:57:22 +0200 | |
|---|---|---|
| committer | 2013-08-21 14:57:22 +0200 | |
| commit | aa94bdaeff370ca88fef9fa3d3414ab0e61da0a8 (patch) | |
| tree | e1a08e1e9eee4c7f06e08d72eaec8bbbd7bb9595 /app/views/javascript | |
| parent | 35a7f63dbb53692316112df09d213ce89ae13baa (diff) | |
Issue #125 : "suivant" charge articles suivants
Le raccourci pour passer à l'article suivant charge automatiquement les
articles suivants si on vient d'ouvrir le dernier article de la page
Il reste à rajouter une option pour les charger si on se trouve en bas
de la page
Diffstat (limited to 'app/views/javascript')
| -rw-r--r-- | app/views/javascript/main.phtml | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/views/javascript/main.phtml b/app/views/javascript/main.phtml index e81ae831a..c60093504 100644 --- a/app/views/javascript/main.phtml +++ b/app/views/javascript/main.phtml @@ -122,8 +122,13 @@ function prev_entry() { function next_entry() { old_active = $(".flux.active"); first_active = $(".flux:first"); + last_active = $(".flux:last"); new_active = old_active.nextAll (".flux:first"); + if(last_active.attr("id") == new_active.attr("id")) { + load_more_posts (); + } + if (new_active.hasClass("flux")) { toggleContent (new_active, old_active); } else if (old_active[0] === undefined && |
