mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
f7e3d0374e
commit
7e1770c204
@ -79,11 +79,11 @@ def build_navigation(start, num, total, url_base): # {{{
|
|||||||
|
|
||||||
if start > 1:
|
if start > 1:
|
||||||
for t,s in [('First', 1), ('Previous', max(start-num,1))]:
|
for t,s in [('First', 1), ('Previous', max(start-num,1))]:
|
||||||
left_buttons.append(A(t, href='%s;start=%d'%(url_base, s)))
|
left_buttons.append(A(t, href='%s&start=%d'%(url_base, s)))
|
||||||
|
|
||||||
if total > start + num:
|
if total > start + num:
|
||||||
for t,s in [('Next', start+num), ('Last', total-num+1)]:
|
for t,s in [('Next', start+num), ('Last', total-num+1)]:
|
||||||
right_buttons.append(A(t, href='%s;start=%d'%(url_base, s)))
|
right_buttons.append(A(t, href='%s&start=%d'%(url_base, s)))
|
||||||
|
|
||||||
buttons = TABLE(
|
buttons = TABLE(
|
||||||
TR(left_buttons, right_buttons),
|
TR(left_buttons, right_buttons),
|
||||||
@ -224,7 +224,6 @@ class MobileServer(object):
|
|||||||
num = int(num)
|
num = int(num)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
raise cherrypy.HTTPError(400, 'num: %s is not an integer'%num)
|
raise cherrypy.HTTPError(400, 'num: %s is not an integer'%num)
|
||||||
print(111111, search)
|
|
||||||
if not search:
|
if not search:
|
||||||
search = ''
|
search = ''
|
||||||
if isbytestring(search):
|
if isbytestring(search):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user