diff --git a/app/controllers/configureController.php b/app/controllers/configureController.php
index d86cda14c..721ff1e95 100755
--- a/app/controllers/configureController.php
+++ b/app/controllers/configureController.php
@@ -9,6 +9,8 @@ class configureController extends ActionController {
);
}
}
+
+ public function indexAction () { }
public function categorizeAction () {
$catDAO = new CategoryDAO ();
diff --git a/app/views/index/index.phtml b/app/views/index/index.phtml
index 08c3aa721..2e6d75ae8 100644
--- a/app/views/index/index.phtml
+++ b/app/views/index/index.phtml
@@ -15,18 +15,21 @@
- author (); ?>
+
+
- feed (true); ?>
-
- le date (); ?>
- sur
name (); ?> ); ?>)
,
-
content (); ?>
+ author (); ?>
+ feed (true); ?>
+ Le date (); ?>
+
+ sur
name (); ?> ); ?>)
,
+
+
diff --git a/app/views/javascript/main.phtml b/app/views/javascript/main.phtml
index e416cad95..a9ce2c5b1 100644
--- a/app/views/javascript/main.phtml
+++ b/app/views/javascript/main.phtml
@@ -24,7 +24,7 @@ function slide (new_active, old_active) {
old_active.children (".content").slideUp (200);
new_active.children (".content").slideDown (200, function () {
$.smoothScroll({
- offset: new_active.position ().top + 25
+ offset: new_active.position ().top
});
});
} else {
@@ -32,11 +32,6 @@ function slide (new_active, old_active) {
offset: new_active.position ().top + 25
});
}
-
- // si le dernier post est actif, on charge les suivants
- if (new_active.attr ("id") == $(".post.flux:last").attr ("id")) {
- load_more_posts ();
- }
}
function add_not_read (nb) {
diff --git a/public/data/Configuration.array.php b/public/data/Configuration.array.php
index ca5af0a01..93e089c9e 100644
--- a/public/data/Configuration.array.php
+++ b/public/data/Configuration.array.php
@@ -1,6 +1,6 @@
10,
+ 'posts_per_page' => 50,
'default_view' => 'all',
'display_posts' => 'no',
'sort_order' => 'low_to_high',
diff --git a/public/scripts/endless_mode.js b/public/scripts/endless_mode.js
index a05da97db..30b91822c 100644
--- a/public/scripts/endless_mode.js
+++ b/public/scripts/endless_mode.js
@@ -1,24 +1,34 @@
-var url = "";
+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 () {
- $.get (url, function (data) {
+ load = true;
+ $.get (url_next_page, function (data) {
$("#load_more").before ($("#stream .post", data));
- url = $(".pagination:last li.pager-next a", data).attr ("href");
- if (url === undefined) {
- $("#load_more").html ("Il n'y a plus rien à charger");
- $("#load_more").addClass ("disable");
- }
+ url_next_page = $(".pagination:last li.pager-next a", data).attr ("href");
init_posts ();
+ load_more_refresh ();
+ load = false;
});
}
$(document).ready (function () {
- url = $(".pagination:last li.pager-next a").attr ("href");
+ url_next_page = $(".pagination:last li.pager-next a").attr ("href");
$(".pagination:last").remove ();
- $("#stream").append ("