diff --git a/imgsrc/srv/fts.svg b/imgsrc/srv/fts.svg new file mode 100644 index 0000000000..39f49bdc71 --- /dev/null +++ b/imgsrc/srv/fts.svg @@ -0,0 +1,26 @@ + + + + + + + + + + + + diff --git a/src/pyj/book_list/fts.pyj b/src/pyj/book_list/fts.pyj new file mode 100644 index 0000000000..5e5a0db2ff --- /dev/null +++ b/src/pyj/book_list/fts.pyj @@ -0,0 +1,14 @@ +# vim:fileencoding=utf-8 +# License: GPL v3 Copyright: 2022, Kovid Goyal +from __python__ import bound_methods, hash_literals + + +from book_list.ui import set_panel_handler + + +def init(container_id): + c = document.getElementById(container_id) + c.innerText = 'TODO: Implement me' + + +set_panel_handler('fts', init) diff --git a/src/pyj/book_list/main.pyj b/src/pyj/book_list/main.pyj index 1a32478853..f336b49518 100644 --- a/src/pyj/book_list/main.pyj +++ b/src/pyj/book_list/main.pyj @@ -27,6 +27,7 @@ import book_list.local_books # noqa: unused-import import book_list.book_details # noqa: unused-import import book_list.edit_metadata # noqa: unused-import import book_list.convert_book # noqa: unused-import +import book_list.fts # noqa: unused-import def remove_initial_progress_bar(): diff --git a/src/pyj/book_list/search.pyj b/src/pyj/book_list/search.pyj index 981b740bc8..fff1b42c5c 100644 --- a/src/pyj/book_list/search.pyj +++ b/src/pyj/book_list/search.pyj @@ -431,6 +431,7 @@ def create_search_panel(container): search_bar = create_search_bar(execute_search_interactive, 'search-books', tooltip=_('Search for books'), placeholder=_('Enter the search query'), button=search_button) set_css(search_bar, flex_grow='10', margin_right='0.5em') search_container.appendChild(E.div(style="display: flex; width: 100%;", search_bar, search_button)) + search_container.appendChild(E.div(style="text-align: left; padding-top: 1ex", E.a(class_="blue-link", svgicon("fts"), '\xa0', _('Search the full text of books instead'), href='javascript: void(0)', onclick=show_panel.bind(None, "fts")))) search_container.appendChild(E.ul(class_='search-items', data_component='search_expression')) # Build loading panel