mirror of
https://github.com/abap2UI5/abap2UI5.git
synced 2025-04-29 20:38:43 +08:00
fix showing message toast multiple times (#390)
This commit is contained in:
parent
df9b3be980
commit
ed957067cf
|
@ -84,19 +84,6 @@ CLASS Z2UI5_CL_HTTP_HANDLER IMPLEMENTATION.
|
||||||
|\n| &&
|
|\n| &&
|
||||||
` onAfterRendering: function () {` && |\n| &&
|
` onAfterRendering: function () {` && |\n| &&
|
||||||
|\n| &&
|
|\n| &&
|
||||||
` if (sap.z2ui5.oResponse.PARAMS.TITLE != "") {` && |\n| &&
|
|
||||||
` document.title = sap.z2ui5.oResponse.PARAMS.TITLE;` && |\n| &&
|
|
||||||
` }` && |\n| &&
|
|
||||||
` if (sap.z2ui5.oResponse.PARAMS.S_MSG_TOAST.TEXT !== '') {` && |\n| &&
|
|
||||||
` sap.m.MessageToast.show(sap.z2ui5.oResponse.PARAMS.S_MSG_TOAST.TEXT);` && |\n| &&
|
|
||||||
` }` && |\n| &&
|
|
||||||
` if (sap.z2ui5.oResponse.PARAMS.S_MSG_BOX.TEXT !== '') {` && |\n| &&
|
|
||||||
` sap.m.MessageBox[sap.z2ui5.oResponse.PARAMS.S_MSG_BOX.TYPE](sap.z2ui5.oResponse.PARAMS.S_MSG_BOX.TEXT);` && |\n| &&
|
|
||||||
` }` && |\n| &&
|
|
||||||
` if (sap.z2ui5.oResponse.SEARCH != "") {` && |\n| &&
|
|
||||||
` history.replaceState(null, null, sap.z2ui5.oResponse.SEARCH );` && |\n| &&
|
|
||||||
` // window.history.replaceState("", "", window.location.origin + sap.z2ui5.oResponse.PARAMS.PATH + window.location.search);` && |\n| &&
|
|
||||||
` }` && |\n| &&
|
|
||||||
` if (sap.z2ui5.oResponse.PARAMS.S_CURSOR.ID !== '') {` && |\n| &&
|
` if (sap.z2ui5.oResponse.PARAMS.S_CURSOR.ID !== '') {` && |\n| &&
|
||||||
` jQuery.sap.delayedCall(50, this, () => {` && |\n| &&
|
` jQuery.sap.delayedCall(50, this, () => {` && |\n| &&
|
||||||
` var ofocus = sap.z2ui5.oView.byId(sap.z2ui5.oResponse.PARAMS.S_CURSOR.ID).getFocusInfo();` && |\n| &&
|
` var ofocus = sap.z2ui5.oView.byId(sap.z2ui5.oResponse.PARAMS.S_CURSOR.ID).getFocusInfo();` && |\n| &&
|
||||||
|
@ -331,6 +318,19 @@ CLASS Z2UI5_CL_HTTP_HANDLER IMPLEMENTATION.
|
||||||
` if (sap.z2ui5.oResponse.PARAMS.S_POPUP.CHECK_UPDATE_MODEL == true) { sap.z2ui5.oViewPopup.setModel(new sap.ui.model.json.JSONModel(sap.z2ui5.oResponse.OVIEWMODEL)); }` && |\n| &&
|
` if (sap.z2ui5.oResponse.PARAMS.S_POPUP.CHECK_UPDATE_MODEL == true) { sap.z2ui5.oViewPopup.setModel(new sap.ui.model.json.JSONModel(sap.z2ui5.oResponse.OVIEWMODEL)); }` && |\n| &&
|
||||||
` if (sap.z2ui5.oResponse.PARAMS.S_POPOVER.CHECK_UPDATE_MODEL == true) { sap.z2ui5.oViewPopover.setModel(new sap.ui.model.json.JSONModel(sap.z2ui5.oResponse.OVIEWMODEL)); }` && |\n| &&
|
` if (sap.z2ui5.oResponse.PARAMS.S_POPOVER.CHECK_UPDATE_MODEL == true) { sap.z2ui5.oViewPopover.setModel(new sap.ui.model.json.JSONModel(sap.z2ui5.oResponse.OVIEWMODEL)); }` && |\n| &&
|
||||||
` sap.z2ui5.oController.onAfterRendering();` && |\n| &&
|
` sap.z2ui5.oController.onAfterRendering();` && |\n| &&
|
||||||
|
` }` && |\n| &&
|
||||||
|
` if (sap.z2ui5.oResponse.PARAMS.TITLE != "") {` && |\n| &&
|
||||||
|
` document.title = sap.z2ui5.oResponse.PARAMS.TITLE;` && |\n| &&
|
||||||
|
` }` && |\n| &&
|
||||||
|
` if (sap.z2ui5.oResponse.PARAMS.S_MSG_TOAST.TEXT !== '') {` && |\n| &&
|
||||||
|
` sap.m.MessageToast.show(sap.z2ui5.oResponse.PARAMS.S_MSG_TOAST.TEXT);` && |\n| &&
|
||||||
|
` }` && |\n| &&
|
||||||
|
` if (sap.z2ui5.oResponse.PARAMS.S_MSG_BOX.TEXT !== '') {` && |\n| &&
|
||||||
|
` sap.m.MessageBox[sap.z2ui5.oResponse.PARAMS.S_MSG_BOX.TYPE](sap.z2ui5.oResponse.PARAMS.S_MSG_BOX.TEXT);` && |\n| &&
|
||||||
|
` }` && |\n| &&
|
||||||
|
` if (sap.z2ui5.oResponse.SEARCH != "") {` && |\n| &&
|
||||||
|
` history.replaceState(null, null, sap.z2ui5.oResponse.SEARCH );` && |\n| &&
|
||||||
|
` // window.history.replaceState("", "", window.location.origin + sap.z2ui5.oResponse.PARAMS.PATH + window.location.search);` && |\n| &&
|
||||||
` }` && |\n| &&
|
` }` && |\n| &&
|
||||||
` },` && |\n| &&
|
` },` && |\n| &&
|
||||||
` readHttp: () => {` && |\n| &&
|
` readHttp: () => {` && |\n| &&
|
||||||
|
|
|
@ -1258,7 +1258,8 @@ public section.
|
||||||
ENDCLASS.
|
ENDCLASS.
|
||||||
|
|
||||||
|
|
||||||
CLASS z2ui5_cl_xml_view IMPLEMENTATION.
|
|
||||||
|
CLASS Z2UI5_CL_XML_VIEW IMPLEMENTATION.
|
||||||
|
|
||||||
|
|
||||||
METHOD actions.
|
METHOD actions.
|
||||||
|
@ -1299,6 +1300,7 @@ CLASS z2ui5_cl_xml_view IMPLEMENTATION.
|
||||||
result = _generic( name = `Bar` ).
|
result = _generic( name = `Bar` ).
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
METHOD begin_column_pages.
|
METHOD begin_column_pages.
|
||||||
" todo, implement method
|
" todo, implement method
|
||||||
result = _generic( name = `beginColumnPages`
|
result = _generic( name = `beginColumnPages`
|
||||||
|
@ -2739,6 +2741,7 @@ CLASS z2ui5_cl_xml_view IMPLEMENTATION.
|
||||||
( n = `selected` v = selected ) ) ).
|
( n = `selected` v = selected ) ) ).
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
METHOD step_input.
|
METHOD step_input.
|
||||||
result = me.
|
result = me.
|
||||||
_generic( name = `StepInput`
|
_generic( name = `StepInput`
|
||||||
|
@ -3143,6 +3146,7 @@ CLASS z2ui5_cl_xml_view IMPLEMENTATION.
|
||||||
|
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
METHOD tree.
|
METHOD tree.
|
||||||
result = _generic( name = `Tree`
|
result = _generic( name = `Tree`
|
||||||
t_prop = VALUE #(
|
t_prop = VALUE #(
|
||||||
|
@ -3169,5 +3173,4 @@ CLASS z2ui5_cl_xml_view IMPLEMENTATION.
|
||||||
( n = `selected` v = selected ) ) ).
|
( n = `selected` v = selected ) ) ).
|
||||||
|
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
ENDCLASS.
|
ENDCLASS.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user