Disable 'Apply CSS' button when Custom CSS is disabled.
This commit is contained in:
parent
893eb114ef
commit
52a5d1bd45
@ -337,14 +337,16 @@ Settings =
|
|||||||
|
|
||||||
interval = $ 'input[name="Interval"]', section
|
interval = $ 'input[name="Interval"]', section
|
||||||
customCSS = $ 'input[name="Custom CSS"]', section
|
customCSS = $ 'input[name="Custom CSS"]', section
|
||||||
|
applyCSS = $ '#apply-css', section
|
||||||
|
|
||||||
interval.value = Conf['Interval']
|
interval.value = Conf['Interval']
|
||||||
customCSS.checked = Conf['Custom CSS']
|
customCSS.checked = Conf['Custom CSS']
|
||||||
inputs['usercss'].disabled = !Conf['Custom CSS']
|
inputs['usercss'].disabled = !Conf['Custom CSS']
|
||||||
|
applyCSS.disabled = !Conf['Custom CSS']
|
||||||
|
|
||||||
$.on interval, 'change', ThreadUpdater.cb.interval
|
$.on interval, 'change', ThreadUpdater.cb.interval
|
||||||
$.on customCSS, 'change', Settings.togglecss
|
$.on customCSS, 'change', Settings.togglecss
|
||||||
$.on $('#apply-css', section), 'click', Settings.usercss
|
$.on applyCSS, 'click', Settings.usercss
|
||||||
|
|
||||||
archBoards = {}
|
archBoards = {}
|
||||||
for {name, boards, files, software, withCredentials} in Redirect.archives
|
for {name, boards, files, software, withCredentials} in Redirect.archives
|
||||||
@ -464,7 +466,7 @@ Settings =
|
|||||||
img[3].src = Favicon.unreadDead
|
img[3].src = Favicon.unreadDead
|
||||||
|
|
||||||
togglecss: ->
|
togglecss: ->
|
||||||
if $('textarea[name=usercss]', $.x 'ancestor::fieldset[1]', @).disabled = !@checked
|
if $('textarea[name=usercss]', $.x 'ancestor::fieldset[1]', @).disabled = $.id('apply-css').disabled = !@checked
|
||||||
CustomCSS.rmStyle()
|
CustomCSS.rmStyle()
|
||||||
else
|
else
|
||||||
CustomCSS.addStyle()
|
CustomCSS.addStyle()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user