1
0
mirror of https://github.com/janeczku/calibre-web synced 2024-12-25 09:30:31 +00:00

Fix Authors page pagination

Update infinite scroll plugin
This commit is contained in:
Ozzieisaacs 2019-01-25 21:58:19 +01:00
parent 97064db2a4
commit ec81a3cd92
3 changed files with 32 additions and 15 deletions

File diff suppressed because one or more lines are too long

View File

@ -77,11 +77,11 @@ $(function() {
layoutMode : "fitRows" layoutMode : "fitRows"
}); });
$(".load-more .row").infinitescroll({ /*$(".load-more .row").infinitescroll({
debug: false, debug: true,
navSelector : ".pagination", navSelector : ".pagination",
// selector for the paged navigation (it will be hidden) // selector for the paged navigation (it will be hidden)
nextSelector : ".pagination a:last", nextSelector : ".next",
// selector for the NEXT link (to page 2) // selector for the NEXT link (to page 2)
itemSelector : ".load-more .book", itemSelector : ".load-more .book",
animate : true, animate : true,
@ -89,6 +89,22 @@ $(function() {
// selector for all items you'll retrieve // selector for all items you'll retrieve
}, function(data) { }, function(data) {
$(".load-more .row").isotope( "appended", $(data), null ); $(".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() { $("#restart").click(function() {

View File

@ -1329,7 +1329,7 @@ def author_list():
@app.route("/author/<int:book_id>", defaults={'page': 1}) @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 @login_required_if_no_ano
def author(book_id, page): def author(book_id, page):
entries, __, pagination = fill_indexpage(page, db.Books, db.Books.authors.any(db.Authors.id == book_id), entries, __, pagination = fill_indexpage(page, db.Books, db.Books.authors.any(db.Authors.id == book_id),
@ -1861,15 +1861,6 @@ def shutdown():
abort(404) 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"]) @app.route("/search", methods=["GET"])
@login_required_if_no_ano @login_required_if_no_ano
def search(): def search():