From 8245321f86f7e77643b0423c36b8785f997320e5 Mon Sep 17 00:00:00 2001 From: tammo0 Date: Fri, 31 May 2019 19:51:24 +0200 Subject: [PATCH] fixes fixes --- sonoff/xdrv_01_webserver.ino | 5 ++++- sonoff/xdrv_07_domoticz.ino | 12 ++++++------ sonoff/xdrv_09_timers.ino | 19 ++++++++----------- sonoff/xdrv_10_scripter.ino | 8 ++++---- 4 files changed, 22 insertions(+), 22 deletions(-) diff --git a/sonoff/xdrv_01_webserver.ino b/sonoff/xdrv_01_webserver.ino index 8eed7b54f..e71e4016d 100644 --- a/sonoff/xdrv_01_webserver.ino +++ b/sonoff/xdrv_01_webserver.ino @@ -58,6 +58,9 @@ const char HTTP_HEAD[] PROGMEM = "function eb(s){" "return document.getElementById(s);" // Save code space "}" + "function qs(s){" // Alias to save code space + "return document.querySelector(s);" + "}" "function idn(){" "var t=0,i=document.querySelectorAll('input,button,textarea,select'); while(i.length>=t){ if(i[t]) {i[t]['name']=(i[t].hasAttribute('id')&&(!i[t].hasAttribute('name')))?i[t]['id']:i[t]['name'];}t++;}" "}" @@ -319,7 +322,7 @@ const char HTTP_FORM_TEMPLATE_FLAG[] PROGMEM = const char HTTP_FORM_MODULE[] PROGMEM = "
 " D_MODULE_PARAMETERS " " "
" - "

" D_MODULE_TYPE " (%s)

" + "

" D_MODULE_TYPE " (%s)

" "
"; const char HTTP_FORM_WIFI[] PROGMEM = diff --git a/sonoff/xdrv_07_domoticz.ino b/sonoff/xdrv_07_domoticz.ino index 21c191699..2d7ceb8e0 100644 --- a/sonoff/xdrv_07_domoticz.ino +++ b/sonoff/xdrv_07_domoticz.ino @@ -434,14 +434,14 @@ const char HTTP_FORM_DOMOTICZ[] PROGMEM = "" "
"; const char HTTP_FORM_DOMOTICZ_RELAY[] PROGMEM = - "" - ""; - const char HTTP_FORM_DOMOTICZ_SWITCH[] PROGMEM = - ""; + "" + ""; +const char HTTP_FORM_DOMOTICZ_SWITCH[] PROGMEM = + ""; const char HTTP_FORM_DOMOTICZ_SENSOR[] PROGMEM = - ""; + ""; const char HTTP_FORM_DOMOTICZ_TIMER[] PROGMEM = - ""; + ""; void HandleDomoticzConfiguration(void) { diff --git a/sonoff/xdrv_09_timers.ino b/sonoff/xdrv_09_timers.ino index ade7ed3eb..8e14aaebb 100644 --- a/sonoff/xdrv_09_timers.ino +++ b/sonoff/xdrv_09_timers.ino @@ -523,9 +523,6 @@ const char HTTP_BTN_MENU_TIMER[] PROGMEM = const char HTTP_TIMER_SCRIPT1[] PROGMEM = "var pt=[],ct=99;" - "function qs(s){" // Alias to save code space - "return document.querySelector(s);" - "}" "function ce(i,q){" // Create select option "var o=document.createElement('option');" "o.textContent=i;" @@ -660,22 +657,22 @@ const char HTTP_FORM_TIMER1[] PROGMEM = "
" " " D_TIMER_PARAMETERS " " "" - "
" D_TIMER_ENABLE "


" + "
" D_TIMER_ENABLE "


" "



" - "

" + "' hidden>



" + "

" "
" "" D_TIMER_ARM " " "" D_TIMER_REPEAT "" - "

" + "
" "
"; #ifdef USE_SUNRISE const char HTTP_FORM_TIMER3[] PROGMEM = "
" - "" D_TIMER_TIME "
" - "" D_SUNRISE " (%s)
" - "" D_SUNSET " (%s)
" + "" D_TIMER_TIME "
" + "" D_SUNRISE " (%s)
" + "" D_SUNSET " (%s)
" "
" "

" "" @@ -690,7 +687,7 @@ const char HTTP_FORM_TIMER4[] PROGMEM = "" " +/- " "" - "

" + "
" "
"; void HandleTimerConfiguration(void) diff --git a/sonoff/xdrv_10_scripter.ino b/sonoff/xdrv_10_scripter.ino index 1eee4a031..d4734ba68 100644 --- a/sonoff/xdrv_10_scripter.ino +++ b/sonoff/xdrv_10_scripter.ino @@ -2394,15 +2394,15 @@ const char HTTP_FORM_SCRIPT1[] PROGMEM = const char HTTP_FORM_SCRIPT1b[] PROGMEM = "" "
" D_DOMOTICZ_IDX " %d
" D_DOMOTICZ_KEY_IDX " %d
" D_DOMOTICZ_SWITCH_IDX " %d
" D_DOMOTICZ_IDX " %d
" D_DOMOTICZ_KEY_IDX " %d
" D_DOMOTICZ_SWITCH_IDX " %d
" D_DOMOTICZ_SENSOR_IDX " %d %s
" D_DOMOTICZ_SENSOR_IDX " %d %s
" D_DOMOTICZ_UPDATE_TIMER " (" STR(DOMOTICZ_UPDATE_TIMER) ")
" D_DOMOTICZ_UPDATE_TIMER " (" STR(DOMOTICZ_UPDATE_TIMER) ")