mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Make it clearer what the completions are for
This commit is contained in:
parent
6556f9a7e9
commit
dfe16969fc
@ -258,9 +258,11 @@ def add_completion(container_id, name):
|
|||||||
def show_completions(container_id, div, field, prefix, names):
|
def show_completions(container_id, div, field, prefix, names):
|
||||||
clear(div)
|
clear(div)
|
||||||
completions = E.div(class_='completions')
|
completions = E.div(class_='completions')
|
||||||
|
if names.length:
|
||||||
|
div.appendChild(E.div(_('Tap to add:')))
|
||||||
div.appendChild(completions)
|
div.appendChild(completions)
|
||||||
for i, name in enumerate(names):
|
for i, name in enumerate(names):
|
||||||
completions.appendChild(E.div(name, onclick=add_completion.bind(None, container_id, name)))
|
completions.appendChild(E.div(E.span(style='color: green', svgicon('plus'), '\xa0'), name, onclick=add_completion.bind(None, container_id, name)))
|
||||||
if i >= 50:
|
if i >= 50:
|
||||||
break
|
break
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user