Popup fixes (#1040)

* popup fixes

* update
This commit is contained in:
oblomov 2024-03-23 14:05:59 +00:00 committed by GitHub
parent 7af2e9d18f
commit c1bc01e735
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -10,12 +10,16 @@ CLASS z2ui5_cl_popup_textedit DEFINITION
IMPORTING
i_stretch_active TYPE abap_bool DEFAULT abap_true
i_textarea TYPE string OPTIONAL
i_title type string default `Editor`
i_check_editable type abap_bool DEFAULT abap_false
PREFERRED PARAMETER i_textarea
RETURNING
VALUE(r_result) TYPE REF TO z2ui5_cl_popup_textedit.
DATA client TYPE REF TO z2ui5_if_client.
DATA mv_stretch_active TYPE abap_bool.
DATA mv_title TYPE string.
DATA mv_check_editable TYPE abap_bool.
DATA check_initialized TYPE abap_bool.
TYPES:
BEGIN OF ty_s_result,
@ -43,6 +47,8 @@ CLASS z2ui5_cl_popup_textedit IMPLEMENTATION.
r_result = NEW #( ).
r_result->mv_stretch_active = i_stretch_active.
r_result->ms_result-text = i_textarea.
r_result->mv_title = i_title.
r_result->mv_check_editable = i_check_editable.
ENDMETHOD.
@ -51,12 +57,13 @@ CLASS z2ui5_cl_popup_textedit IMPLEMENTATION.
DATA(popup) = z2ui5_cl_xml_view=>factory_popup( )->dialog(
afterclose = client->_event( 'BUTTON_TEXTAREA_CANCEL' )
stretch = mv_stretch_active
title = 'Title'
title = mv_title
icon = 'sap-icon://edit'
)->content(
)->text_area(
)->text_area( growing = abap_true
editable = mv_check_editable
* height = '100%'
width = '100%'
* width = '100%'
value = client->_bind_edit( ms_result-text )
)->get_parent(
)->buttons(