From 80c73724f8b9807426b70c39eb2e31176472b942 Mon Sep 17 00:00:00 2001 From: oblomov <102328295+oblomov-dev@users.noreply.github.com> Date: Mon, 3 Jul 2023 16:08:35 +0200 Subject: [PATCH] update home and reload (#335) --- src/z2ui5_cl_http_handler.clas.abap | 10 +- ...z2ui5_cl_http_handler.clas.locals_imp.abap | 121 +++++++++++------- src/z2ui5_if_client.intf.abap | 10 +- 3 files changed, 79 insertions(+), 62 deletions(-) diff --git a/src/z2ui5_cl_http_handler.clas.abap b/src/z2ui5_cl_http_handler.clas.abap index 84be56aa..55eb029a 100644 --- a/src/z2ui5_cl_http_handler.clas.abap +++ b/src/z2ui5_cl_http_handler.clas.abap @@ -190,14 +190,8 @@ CLASS z2ui5_cl_http_handler IMPLEMENTATION. ` onEventFrontend: function (oEvent) {` && |\n| && |\n| && ` switch (oEvent.EVENT) {` && |\n| && - |\n| && - ` case 'LEAVE_HOME':` && |\n| && - ` if (sap.z2ui5.oResponse.PARAMS.PATH != '') {` && |\n| && - ` window.location = window.location.href.split(sap.z2ui5.oResponse.PARAMS.PATH)[0];` && |\n| && - ` } else { window.location.reload(); }` && |\n| && - ` break;` && |\n| && - ` case 'LEAVE_RESTART':` && |\n| && - ` window.location.reload();` && |\n| && + ` case 'LOCATION_RELOAD':` && |\n| && + ` window.location = arguments[ 1 ];` && |\n| && ` break;` && |\n| && ` case 'POPUP_CLOSE':` && |\n| && ` sap.z2ui5.oController.PopupClose();` && |\n| && diff --git a/src/z2ui5_cl_http_handler.clas.locals_imp.abap b/src/z2ui5_cl_http_handler.clas.locals_imp.abap index 669f9011..335a4acc 100644 --- a/src/z2ui5_cl_http_handler.clas.locals_imp.abap +++ b/src/z2ui5_cl_http_handler.clas.locals_imp.abap @@ -942,6 +942,12 @@ CLASS z2ui5_lcl_fw_app IMPLEMENTATION. DATA(lv_source) = `

Source: web

`. DATA(lv_descr) = escape( val = lv_txt && lv_source format = cl_abap_format=>e_xml_attr ). + DATA(ls_get) = client->get( ). + DATA(lv_url_app) = ls_get-s_config-origin && ls_get-s_config-pathname. + DATA(lv_url) = lv_url_app. + SHIFT lv_url RIGHT DELETING TRAILING ls_get-s_config-path_info. + SHIFT lv_url LEFT DELETING LEADING ` `. + DATA(lv_xml) = ` ` && `