Commit ec81a3cd authored by Ozzieisaacs's avatar Ozzieisaacs

Fix Authors page pagination

Update infinite scroll plugin
parent 97064db2
This diff is collapsed.
......@@ -77,11 +77,11 @@ $(function() {
layoutMode : "fitRows"
});
$(".load-more .row").infinitescroll({
debug: false,
/*$(".load-more .row").infinitescroll({
debug: true,
navSelector : ".pagination",
// selector for the paged navigation (it will be hidden)
nextSelector : ".pagination a:last",
nextSelector : ".next",
// selector for the NEXT link (to page 2)
itemSelector : ".load-more .book",
animate : true,
......@@ -89,6 +89,22 @@ $(function() {
// selector for all items you'll retrieve
}, function(data) {
$(".load-more .row").isotope( "appended", $(data), null );
});*/
var $loadMore = $(".load-more .row").infiniteScroll({
debug: false,
// hideNav : ".pagination", # ToDo Renable functionn
// selector for the paged navigation (it will be hidden)
path : ".next",
// selector for the NEXT link (to page 2)
append : ".load-more .book",
//animate : true,
//extraScrollPx: 300
// selector for all items you'll retrieve
});
$loadMore.on( 'append.infiniteScroll', function( event, response, path, data ) {
$(".pagination").addClass("hidden");
$(".load-more .row").isotope( "appended", $(data), null );
});
$("#restart").click(function() {
......
......@@ -1329,7 +1329,7 @@ def author_list():
@app.route("/author/<int:book_id>", defaults={'page': 1})
@app.route("/author/<int:book_id>/<int:page>'")
@app.route("/author/<int:book_id>/<int:page>")
@login_required_if_no_ano
def author(book_id, page):
entries, __, pagination = fill_indexpage(page, db.Books, db.Books.authors.any(db.Authors.id == book_id),
......@@ -1861,15 +1861,6 @@ def shutdown():
abort(404)
'''@app.route("/update")
@login_required
@admin_required
def update():
# updater.updater_thread = helper.Updater()
flash(_(u"Update done"), category="info")
return abort(404)'''
@app.route("/search", methods=["GET"])
@login_required_if_no_ano
def search():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment