mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
e2bfb32dc9
commit
919de5f28c
@ -13,6 +13,8 @@ def on_library_loaded(end_type, xhr, ev):
|
||||
p.parentNode.removeChild(p)
|
||||
if end_type == 'load':
|
||||
interface_data = JSON.parse(xhr.responseText)
|
||||
# TODO: Copy any user specific session data from the server to
|
||||
# the local session data object, overriding local data
|
||||
boss = Boss(interface_data)
|
||||
set_boss(boss)
|
||||
else:
|
||||
@ -27,8 +29,11 @@ def on_library_load_progress(loaded, total):
|
||||
|
||||
def load_book_list():
|
||||
sd = set_session_data(UserSessionData(window.calibre_username))
|
||||
ajax('ajax/interface-data', on_library_loaded, on_library_load_progress, query={
|
||||
'library_id':sd.get('library_id'), 'sort':sd.get('sort')}).send()
|
||||
query = {}
|
||||
if not sd.has_user:
|
||||
# For authenticated users use the session data cached on the server
|
||||
query = {'library_id':sd.get('library_id'), 'sort':sd.get('sort')}
|
||||
ajax('ajax/interface-data', on_library_loaded, on_library_load_progress, query=query).send()
|
||||
|
||||
def on_load():
|
||||
if window.calibre_entry_point == 'book list':
|
||||
|
Loading…
x
Reference in New Issue
Block a user