Replace menu button list

Replace menu button list
This commit is contained in:
Theo Arends 2019-03-04 18:32:23 +01:00
parent d790b1cfca
commit b393cdc9f1
6 changed files with 7 additions and 11 deletions

View File

@ -859,10 +859,8 @@ void HandleRoot(void)
}
#ifndef FIRMWARE_MINIMAL
mqtt_data[0] = '\0';
XdrvCall(FUNC_WEB_ADD_MAIN_BUTTON);
XsnsCall(FUNC_WEB_ADD_MAIN_BUTTON);
WSContentSend(mqtt_data);
#endif // Not FIRMWARE_MINIMAL
if (HTTP_ADMIN == webserver_state) {
@ -964,10 +962,8 @@ void HandleConfiguration(void)
WSContentSendStyle();
WSContentSend(FPSTR(HTTP_BTN_MENU_MODULE));
mqtt_data[0] = '\0';
XdrvCall(FUNC_WEB_ADD_BUTTON);
XsnsCall(FUNC_WEB_ADD_BUTTON);
WSContentSend(mqtt_data);
WSContentSend(FPSTR(HTTP_BTN_MENU4));
WSContentSend(FPSTR(HTTP_BTN_RESET));

View File

@ -990,7 +990,7 @@ bool Xdrv02(uint8_t function)
switch (function) {
#ifdef USE_WEBSERVER
case FUNC_WEB_ADD_BUTTON:
strncat_P(mqtt_data, HTTP_BTN_MENU_MQTT, sizeof(mqtt_data) - strlen(mqtt_data) -1);
WSContentSend(FPSTR(HTTP_BTN_MENU_MQTT));
break;
case FUNC_WEB_ADD_HANDLER:
WebServer->on("/" WEB_HANDLE_MQTT, HandleMqttConfiguration);

View File

@ -536,7 +536,7 @@ bool Xdrv07(uint8_t function)
switch (function) {
#ifdef USE_WEBSERVER
case FUNC_WEB_ADD_BUTTON:
strncat_P(mqtt_data, HTTP_BTN_MENU_DOMOTICZ, sizeof(mqtt_data) - strlen(mqtt_data) -1);
WSContentSend(FPSTR(HTTP_BTN_MENU_DOMOTICZ));
break;
case FUNC_WEB_ADD_HANDLER:
WebServer->on("/" WEB_HANDLE_DOMOTICZ, HandleDomoticzConfiguration);

View File

@ -764,9 +764,9 @@ bool Xdrv09(uint8_t function)
#ifdef USE_TIMERS_WEB
case FUNC_WEB_ADD_BUTTON:
#ifdef USE_RULES
strncat_P(mqtt_data, HTTP_BTN_MENU_TIMER, sizeof(mqtt_data) - strlen(mqtt_data) -1);
WSContentSend(FPSTR(HTTP_BTN_MENU_TIMER));
#else
if (devices_present) { strncat_P(mqtt_data, HTTP_BTN_MENU_TIMER, sizeof(mqtt_data) - strlen(mqtt_data) -1); }
if (devices_present) { WSContentSend(FPSTR(HTTP_BTN_MENU_TIMER)); }
#endif // USE_RULES
break;
case FUNC_WEB_ADD_HANDLER:

View File

@ -1249,7 +1249,7 @@ bool Xdrv11(uint8_t function)
#ifdef USE_WEBSERVER
#ifdef USE_KNX_WEB_MENU
case FUNC_WEB_ADD_BUTTON:
strncat_P(mqtt_data, HTTP_BTN_MENU_KNX, sizeof(mqtt_data) - strlen(mqtt_data) -1);
WSContentSend(FPSTR(HTTP_BTN_MENU_KNX));
break;
case FUNC_WEB_ADD_HANDLER:
WebServer->on("/kn", HandleKNXConfiguration);

View File

@ -492,10 +492,10 @@ bool Xsns34(uint8_t function)
break;
#ifdef USE_HX711_GUI
case FUNC_WEB_ADD_MAIN_BUTTON:
strncat_P(mqtt_data, HTTP_BTN_MENU_MAIN_HX711, sizeof(mqtt_data) - strlen(mqtt_data) -1);
WSContentSend(FPSTR(HTTP_BTN_MENU_MAIN_HX711));
break;
case FUNC_WEB_ADD_BUTTON:
strncat_P(mqtt_data, HTTP_BTN_MENU_HX711, sizeof(mqtt_data) - strlen(mqtt_data) -1);
WSContentSend(FPSTR(HTTP_BTN_MENU_HX711));
break;
case FUNC_WEB_ADD_HANDLER:
WebServer->on("/" WEB_HANDLE_HX711, HandleHxAction);