Follow Zixaphir in adding space to label in UI.checkbox.
Change settings checkbox (where space was unwanted) to HTML template.
This commit is contained in:
parent
845ebcfad4
commit
e1b63d4a99
@ -100,11 +100,8 @@ Settings =
|
|||||||
containers = [fs]
|
containers = [fs]
|
||||||
for key, arr of obj
|
for key, arr of obj
|
||||||
description = arr[1]
|
description = arr[1]
|
||||||
div = $.el 'div'
|
div = $.el 'div',
|
||||||
$.add div, [
|
<%= html('<label><input type="checkbox" name="${key}">${key}</label><span class="description">: ${description}</span>') %>
|
||||||
UI.checkbox key, key, false
|
|
||||||
$.el 'span', class: 'description', textContent: ": #{description}"
|
|
||||||
]
|
|
||||||
input = $ 'input', div
|
input = $ 'input', div
|
||||||
$.on input, 'change', $.cb.checked
|
$.on input, 'change', $.cb.checked
|
||||||
$.on input, 'change', -> @parentNode.parentNode.dataset.checked = @checked
|
$.on input, 'change', -> @parentNode.parentNode.dataset.checked = @checked
|
||||||
|
|||||||
@ -373,7 +373,7 @@ UI = do ->
|
|||||||
checked = Conf[name] unless checked?
|
checked = Conf[name] unless checked?
|
||||||
label = $.el 'label'
|
label = $.el 'label'
|
||||||
input = $.el 'input', {type: 'checkbox', name, checked}
|
input = $.el 'input', {type: 'checkbox', name, checked}
|
||||||
$.add label, [input, $.tn text]
|
$.add label, [input, $.tn " #{text}"]
|
||||||
label
|
label
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -315,7 +315,7 @@ Gallery =
|
|||||||
subEntries: Gallery.menu.createSubEntries()
|
subEntries: Gallery.menu.createSubEntries()
|
||||||
|
|
||||||
createSubEntry: (name) ->
|
createSubEntry: (name) ->
|
||||||
label = UI.checkbox name, " #{name}"
|
label = UI.checkbox name, name
|
||||||
input = label.firstElementChild
|
input = label.firstElementChild
|
||||||
if name in ['Fit Width', 'Fit Height', 'Hide Thumbnails']
|
if name in ['Fit Width', 'Fit Height', 'Hide Thumbnails']
|
||||||
$.on input, 'change', Gallery.cb.setFitness
|
$.on input, 'change', Gallery.cb.setFitness
|
||||||
|
|||||||
@ -295,7 +295,7 @@ ImageExpand =
|
|||||||
subEntries: subEntries
|
subEntries: subEntries
|
||||||
|
|
||||||
createSubEntry: (name, desc) ->
|
createSubEntry: (name, desc) ->
|
||||||
label = UI.checkbox name, " #{name}"
|
label = UI.checkbox name, name
|
||||||
label.title = desc
|
label.title = desc
|
||||||
input = label.firstElementChild
|
input = label.firstElementChild
|
||||||
if name in ['Fit width', 'Fit height']
|
if name in ['Fit width', 'Fit height']
|
||||||
|
|||||||
@ -33,7 +33,7 @@ ThreadUpdater =
|
|||||||
|
|
||||||
subEntries = []
|
subEntries = []
|
||||||
for name, conf of Config.updater.checkbox
|
for name, conf of Config.updater.checkbox
|
||||||
el = UI.checkbox name, " #{name}"
|
el = UI.checkbox name, name
|
||||||
el.title = conf[1]
|
el.title = conf[1]
|
||||||
input = el.firstElementChild
|
input = el.firstElementChild
|
||||||
$.on input, 'change', $.cb.checked
|
$.on input, 'change', $.cb.checked
|
||||||
|
|||||||
@ -435,7 +435,7 @@ ThreadWatcher =
|
|||||||
createSubEntry: (name, desc) ->
|
createSubEntry: (name, desc) ->
|
||||||
entry =
|
entry =
|
||||||
type: 'thread watcher'
|
type: 'thread watcher'
|
||||||
el: UI.checkbox name, " #{name.replace ' Thread Watcher', ''}"
|
el: UI.checkbox name, name.replace(' Thread Watcher', '')
|
||||||
entry.el.title = desc
|
entry.el.title = desc
|
||||||
input = entry.el.firstElementChild
|
input = entry.el.firstElementChild
|
||||||
$.on input, 'change', $.cb.checked
|
$.on input, 'change', $.cb.checked
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user