mirror of
https://github.com/janeczku/calibre-web.git
synced 2024-11-26 08:51:05 +02:00
Fix Authors page pagination
Update infinite scroll plugin
This commit is contained in:
parent
97064db2a4
commit
ec81a3cd92
14
cps/static/js/libs/plugins.js
vendored
14
cps/static/js/libs/plugins.js
vendored
File diff suppressed because one or more lines are too long
@ -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() {
|
||||
|
11
cps/web.py
11
cps/web.py
@ -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():
|
||||
|
Loading…
Reference in New Issue
Block a user