mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Viewer: Fix a regression that broke creating new color schemes
Fixes #1847407 [Unhandled error when adding new color scheme](https://bugs.launchpad.net/calibre/+bug/1847407)
This commit is contained in:
parent
21df277dc4
commit
83dd9c375d
@ -56,14 +56,14 @@ def change_current_color(ev):
|
||||
set_action_button_visibility(ul.parentNode)
|
||||
|
||||
def new_color_scheme(ev):
|
||||
container = get_container()
|
||||
container.lastChild.style.display = 'block'
|
||||
for inp in container.lastChild.querySelectorAll('input'):
|
||||
container = document.getElementById(EDIT_SCHEME)
|
||||
container.style.display = 'block'
|
||||
for inp in container.querySelectorAll('input'):
|
||||
if inp.name is 'link_color_type':
|
||||
inp.checked = inp.value is 'default'
|
||||
else:
|
||||
inp.value = {'name':'', 'bg':'#ffffff', 'fg':'#000000', 'link': '#0000ee'}[inp.name]
|
||||
container.lastChild.querySelector('input').focus()
|
||||
container.querySelector('input').focus()
|
||||
return container
|
||||
|
||||
def edit_color_scheme(ev):
|
||||
|
Loading…
x
Reference in New Issue
Block a user