mirror of
https://github.com/abap2UI5/abap2UI5.git
synced 2025-04-30 00:32:19 +08:00
change style of toast from predefined class (#1110)
This commit is contained in:
parent
7904dad027
commit
1dd11a1495
|
@ -97,7 +97,6 @@ CLASS Z2UI5_CL_CORE_CLIENT IMPLEMENTATION.
|
|||
METHOD z2ui5_if_client~message_toast_display.
|
||||
|
||||
mo_action->ms_next-s_set-s_msg_toast = VALUE #(
|
||||
id = id
|
||||
text = text
|
||||
duration = duration
|
||||
width = width
|
||||
|
@ -111,6 +110,7 @@ CLASS Z2UI5_CL_CORE_CLIENT IMPLEMENTATION.
|
|||
animationtimingfunction = animationtimingfunction
|
||||
animationduration = animationduration
|
||||
closeonbrowsernavigation = closeonbrowsernavigation
|
||||
class = class
|
||||
).
|
||||
|
||||
ENDMETHOD.
|
||||
|
|
|
@ -450,6 +450,11 @@ CLASS Z2UI5_CL_CORE_HTTP_GET IMPLEMENTATION.
|
|||
` animationDuration: parseInt(params[msgType].ANIMATIONDURATION),` && |\n| &&
|
||||
` closeonBrowserNavigation: params[msgType].CLOSEONBROWSERNAVIGATION ? true : false` && |\n| &&
|
||||
` });` && |\n| &&
|
||||
` if(params[msgType].CLASS) {` && |\n| &&
|
||||
` let mtoast = {};` && |\n| &&
|
||||
` mtoast = document.getElementsByClassName("sapMMessageToast")[0];` && |\n| &&
|
||||
` if(mtoast) { mtoast.classList.add(params[msgType].CLASS); }` && |\n| &&
|
||||
` };` && |\n| &&
|
||||
` } else if (msgType === 'S_MSG_BOX') {` && |\n| &&
|
||||
` MessageBox[params[msgType].TYPE](params[msgType].TEXT);` && |\n| &&
|
||||
` }` && |\n| &&
|
||||
|
|
|
@ -87,7 +87,7 @@ INTERFACE z2ui5_if_core_types
|
|||
text TYPE string,
|
||||
END OF s_msg_box,
|
||||
BEGIN OF s_msg_toast,
|
||||
id TYPE string,
|
||||
class TYPE string,
|
||||
text TYPE string,
|
||||
duration TYPE string,
|
||||
width TYPE string,
|
||||
|
|
|
@ -102,7 +102,6 @@ INTERFACE z2ui5_if_client
|
|||
|
||||
METHODS message_toast_display
|
||||
IMPORTING
|
||||
id TYPE string OPTIONAL
|
||||
text TYPE string
|
||||
duration TYPE string DEFAULT `3000`
|
||||
width TYPE string DEFAULT `15em`
|
||||
|
@ -116,6 +115,7 @@ INTERFACE z2ui5_if_client
|
|||
animationtimingfunction TYPE string DEFAULT `ease`
|
||||
animationduration TYPE string DEFAULT `1000`
|
||||
closeonbrowsernavigation TYPE abap_bool DEFAULT abap_true
|
||||
class TYPE string OPTIONAL
|
||||
PREFERRED PARAMETER text.
|
||||
|
||||
METHODS _event
|
||||
|
|
Loading…
Reference in New Issue
Block a user