mirror of https://github.com/arendst/Tasmota.git
Timers: Use visibility instead of disabled
The "+/-" chooser is only needed for sunrise/sunset. Otherwise it's disabled currently. This works. But it's a little confusing. Especially, if you first had "-" there (for sunset) and then switched to normal "time", then the "-" is still there, but you can't change it, because it's disabled. It looks better, if one uses .style.visibility to hide the element. It doesn't change the layout, just the element isn't shown.
This commit is contained in:
parent
065ed79c61
commit
531d36e012
|
@ -554,10 +554,10 @@ const char HTTP_TIMER_SCRIPT2[] PROGMEM =
|
|||
"o=qs('#ho');"
|
||||
"e=o.childElementCount;"
|
||||
"if(b==1){"
|
||||
"qs('#dr').disabled='';"
|
||||
"qs('#dr').style.visibility='';"
|
||||
"if(e>12){for(i=12;i<=23;i++){o.removeChild(o.lastElementChild);}}" // Create offset hours select options
|
||||
"}else{"
|
||||
"qs('#dr').disabled='disabled';"
|
||||
"qs('#dr').style.visibility='hidden';"
|
||||
"if(e<23){for(i=12;i<=23;i++){ce(i,o);}}" // Create hours select options
|
||||
"}"
|
||||
"}";
|
||||
|
|
Loading…
Reference in New Issue