new post bug: increase offset
This commit is contained in:
parent
37b523e689
commit
3fdbe8986a
2 changed files with 7 additions and 2 deletions
|
@ -44,6 +44,6 @@ logs_path = data/logs/
|
|||
|
||||
[system]
|
||||
system_name = blog
|
||||
version = 1.22
|
||||
version = 1.23
|
||||
debug = false
|
||||
logs = false
|
|
@ -49,6 +49,11 @@ var posts = {
|
|||
this.load();
|
||||
},
|
||||
|
||||
add_new: function(post) {
|
||||
$("#posts").prepend(post);
|
||||
this.offset++;
|
||||
},
|
||||
|
||||
load: function(){
|
||||
// If is something loading now or is loading done
|
||||
if(posts.loading || posts.last)
|
||||
|
@ -343,7 +348,7 @@ var new_post = {
|
|||
post.apply_post();
|
||||
|
||||
// Prepend
|
||||
$("#posts").prepend(post);
|
||||
posts.add_new(post);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue