diff options
| author | 2013-03-11 20:26:22 +0100 | |
|---|---|---|
| committer | 2013-03-11 20:26:22 +0100 | |
| commit | e405af1049a6abbee717db0d4e289f4cd4862b67 (patch) | |
| tree | 6f2551ca2ea2f95bd31fd045a86e85caa79a7898 /public/scripts/endless_mode.js | |
| parent | 53aef139b8c61f41fede93b3f58659820b10ccf4 (diff) | |
Màj design + suppression endless_mode + suppression read_mode (reviendra sous une autre forme ?)
Diffstat (limited to 'public/scripts/endless_mode.js')
| -rw-r--r-- | public/scripts/endless_mode.js | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/public/scripts/endless_mode.js b/public/scripts/endless_mode.js deleted file mode 100644 index 7a9840cd4..000000000 --- a/public/scripts/endless_mode.js +++ /dev/null @@ -1,41 +0,0 @@ -var url_next_page = ""; -var load = false; - -function load_more_refresh () { - if (url_next_page === undefined) { - $("#load_more").html ("Il n'y a rien à charger"); - $("#load_more").addClass ("disable"); - } else { - $("#load_more").html ("Charger plus d'articles"); - } -} - -function load_more_posts (f_callback) { - load = true; - $.get (url_next_page, function (data) { - $("#load_more").before ($("#stream .post", data)); - - url_next_page = $(".pagination:last li.pager-next a", data).attr ("href"); - - init_posts (); - load_more_refresh (); - if (typeof f_callback == 'function') { - f_callback.call (this); - } - load = false; - }); -} - -$(document).ready (function () { - url_next_page = $(".pagination:last li.pager-next a").attr ("href"); - $(".pagination:last").remove (); - - $("#stream").append ("<a id=\"load_more\" href=\"#\"></a>"); - load_more_refresh (); - - $("#load_more").click (function () { - load_more_posts (); - - return false; - }); -}); |
