mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Content server: When a search matches no queries, do not show an error message
This commit is contained in:
parent
07584f5606
commit
837833017a
@ -285,6 +285,15 @@ function booklist(hide_sort) {
|
||||
first_page();
|
||||
}
|
||||
|
||||
function search_result() {
|
||||
var test = $("#booklist #page0").html();
|
||||
if (!test) {
|
||||
$("#booklist").html("No books found matching this query");
|
||||
return;
|
||||
}
|
||||
booklist();
|
||||
}
|
||||
|
||||
function show_details(a_dom) {
|
||||
var book = $(a_dom).closest('div.summary');
|
||||
var bd = $('#book_details_dialog');
|
||||
|
@ -873,7 +873,7 @@ class BrowseServer(object):
|
||||
suffix=_('in search')+': '+xml(query))
|
||||
return self.browse_template(sort, category=False, initial_search=query).format(
|
||||
title=_('Matching books'),
|
||||
script='booklist();', main=html)
|
||||
script='search_result();', main=html)
|
||||
|
||||
# }}}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user