mirror of
https://github.com/openshwprojects/OpenBK7231T_App.git
synced 2026-02-07 02:55:26 +00:00
API CHANGE - extend http callback for drivers so it includes bPreState boolean so we can add HTML either before state div (without refresh) or in state div (refreshing)
This commit is contained in:
@ -340,16 +340,14 @@ int http_fn_index(http_request_t* request) {
|
||||
poststr(request, "</div>"); // end div#change
|
||||
|
||||
|
||||
#if defined(ENABLE_DRIVER_WIDGET)
|
||||
if (DRV_IsRunning("Widget")) {
|
||||
DRV_Widget_BeforeState(request);
|
||||
}
|
||||
#endif
|
||||
#if ENABLE_OBK_BERRY
|
||||
void Berry_SaveRequest(http_request_t *r);
|
||||
Berry_SaveRequest(request);
|
||||
CMD_Berry_RunEventHandlers_StrInt(CMD_EVENT_ON_HTTP, "prestate", (int)request);
|
||||
#endif
|
||||
#ifndef OBK_DISABLE_ALL_DRIVERS
|
||||
DRV_AppendInformationToHTTPIndexPage(request, true);
|
||||
#endif
|
||||
|
||||
poststr(request, "<div id=\"state\">"); // replaceable content follows
|
||||
}
|
||||
@ -770,7 +768,7 @@ int http_fn_index(http_request_t* request) {
|
||||
|
||||
poststr(request, "</table>");
|
||||
#ifndef OBK_DISABLE_ALL_DRIVERS
|
||||
DRV_AppendInformationToHTTPIndexPage(request);
|
||||
DRV_AppendInformationToHTTPIndexPage(request, false);
|
||||
#endif
|
||||
|
||||
if (1) {
|
||||
|
||||
Reference in New Issue
Block a user