mirror of
https://github.com/abap2UI5/abap2UI5.git
synced 2025-04-30 14:36:10 +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.
|
METHOD z2ui5_if_client~message_toast_display.
|
||||||
|
|
||||||
mo_action->ms_next-s_set-s_msg_toast = VALUE #(
|
mo_action->ms_next-s_set-s_msg_toast = VALUE #(
|
||||||
id = id
|
|
||||||
text = text
|
text = text
|
||||||
duration = duration
|
duration = duration
|
||||||
width = width
|
width = width
|
||||||
|
@ -111,6 +110,7 @@ CLASS Z2UI5_CL_CORE_CLIENT IMPLEMENTATION.
|
||||||
animationtimingfunction = animationtimingfunction
|
animationtimingfunction = animationtimingfunction
|
||||||
animationduration = animationduration
|
animationduration = animationduration
|
||||||
closeonbrowsernavigation = closeonbrowsernavigation
|
closeonbrowsernavigation = closeonbrowsernavigation
|
||||||
|
class = class
|
||||||
).
|
).
|
||||||
|
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
|
@ -450,6 +450,11 @@ CLASS Z2UI5_CL_CORE_HTTP_GET IMPLEMENTATION.
|
||||||
` animationDuration: parseInt(params[msgType].ANIMATIONDURATION),` && |\n| &&
|
` animationDuration: parseInt(params[msgType].ANIMATIONDURATION),` && |\n| &&
|
||||||
` closeonBrowserNavigation: params[msgType].CLOSEONBROWSERNAVIGATION ? true : false` && |\n| &&
|
` closeonBrowserNavigation: params[msgType].CLOSEONBROWSERNAVIGATION ? true : false` && |\n| &&
|
||||||
` });` && |\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| &&
|
` } else if (msgType === 'S_MSG_BOX') {` && |\n| &&
|
||||||
` MessageBox[params[msgType].TYPE](params[msgType].TEXT);` && |\n| &&
|
` MessageBox[params[msgType].TYPE](params[msgType].TEXT);` && |\n| &&
|
||||||
` }` && |\n| &&
|
` }` && |\n| &&
|
||||||
|
|
|
@ -87,7 +87,7 @@ INTERFACE z2ui5_if_core_types
|
||||||
text TYPE string,
|
text TYPE string,
|
||||||
END OF s_msg_box,
|
END OF s_msg_box,
|
||||||
BEGIN OF s_msg_toast,
|
BEGIN OF s_msg_toast,
|
||||||
id TYPE string,
|
class TYPE string,
|
||||||
text TYPE string,
|
text TYPE string,
|
||||||
duration TYPE string,
|
duration TYPE string,
|
||||||
width TYPE string,
|
width TYPE string,
|
||||||
|
|
|
@ -102,7 +102,6 @@ INTERFACE z2ui5_if_client
|
||||||
|
|
||||||
METHODS message_toast_display
|
METHODS message_toast_display
|
||||||
IMPORTING
|
IMPORTING
|
||||||
id TYPE string OPTIONAL
|
|
||||||
text TYPE string
|
text TYPE string
|
||||||
duration TYPE string DEFAULT `3000`
|
duration TYPE string DEFAULT `3000`
|
||||||
width TYPE string DEFAULT `15em`
|
width TYPE string DEFAULT `15em`
|
||||||
|
@ -116,6 +115,7 @@ INTERFACE z2ui5_if_client
|
||||||
animationtimingfunction TYPE string DEFAULT `ease`
|
animationtimingfunction TYPE string DEFAULT `ease`
|
||||||
animationduration TYPE string DEFAULT `1000`
|
animationduration TYPE string DEFAULT `1000`
|
||||||
closeonbrowsernavigation TYPE abap_bool DEFAULT abap_true
|
closeonbrowsernavigation TYPE abap_bool DEFAULT abap_true
|
||||||
|
class TYPE string OPTIONAL
|
||||||
PREFERRED PARAMETER text.
|
PREFERRED PARAMETER text.
|
||||||
|
|
||||||
METHODS _event
|
METHODS _event
|
||||||
|
|
Loading…
Reference in New Issue
Block a user