Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
douban-api-proxy
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
captainwong
douban-api-proxy
Commits
ec81a3cd
Commit
ec81a3cd
authored
Jan 25, 2019
by
Ozzieisaacs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Authors page pagination
Update infinite scroll plugin
parent
97064db2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
15 deletions
+32
-15
plugins.js
cps/static/js/libs/plugins.js
+12
-2
main.js
cps/static/js/main.js
+19
-3
web.py
cps/web.py
+1
-10
No files found.
cps/static/js/libs/plugins.js
View file @
ec81a3cd
This diff is collapsed.
Click to expand it.
cps/static/js/main.js
View file @
ec81a3cd
...
@@ -77,11 +77,11 @@ $(function() {
...
@@ -77,11 +77,11 @@ $(function() {
layoutMode
:
"fitRows"
layoutMode
:
"fitRows"
});
});
$
(
".load-more .row"
).
infinitescroll
({
/*
$(".load-more .row").infinitescroll({
debug
:
fals
e
,
debug:
tru
e,
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:las
t"
,
nextSelector : ".
nex
t",
// 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() {
...
@@ -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
()
{
...
...
cps/web.py
View file @
ec81a3cd
...
@@ -1329,7 +1329,7 @@ def author_list():
...
@@ -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():
...
@@ -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
():
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment