low release adjustments for popups (#989)

* refactoring

* low release compatibility

* update

* update

* update

* update
This commit is contained in:
oblomov 2024-03-04 16:58:36 +01:00 committed by GitHub
parent 9bda034436
commit 8615e1aaba
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
20 changed files with 73 additions and 84 deletions

View File

@ -191,7 +191,7 @@ class lcl_json_parser definition final.
private section.
types:
ty_stack_tt type standard table of ref to z2ui5_if_ajson_types=>ty_node.
ty_stack_tt TYPE STANDARD TABLE OF ref to z2ui5_if_ajson_types=>ty_node.
data mt_stack type ty_stack_tt.
data mv_stack_path type string.
@ -253,7 +253,7 @@ class lcl_json_parser implementation.
data lv_json type string.
data lv_offset type i.
data lt_text type table of string.
data lt_text TYPE STANDARD TABLE OF string.
data lv_text type string.
data lv_line type i.
data lv_pos type i.
@ -1980,7 +1980,7 @@ class lcl_mutator_queue definition final.
value(ro_self) type ref to lcl_mutator_queue.
private section.
data mt_queue type standard table of ref to lif_mutator_runner.
data mt_queue TYPE STANDARD TABLE OF ref to lif_mutator_runner.
endclass.

View File

@ -1628,8 +1628,8 @@ CLASS ltcl_json_to_abap IMPLEMENTATION.
METHOD to_abap_array_of_arrays_simple.
DATA lo_cut TYPE REF TO lcl_json_to_abap.
DATA lt_mock TYPE TABLE OF string_table.
DATA lt_exp TYPE TABLE OF string_table.
DATA lt_mock TYPE STANDARD TABLE OF string_table.
DATA lt_exp TYPE STANDARD TABLE OF string_table.
DATA lt_tmp TYPE string_table.
DATA lo_nodes TYPE REF TO lcl_nodes_helper.
@ -1662,8 +1662,8 @@ CLASS ltcl_json_to_abap IMPLEMENTATION.
METHOD to_abap_array_of_arrays.
DATA lo_cut TYPE REF TO lcl_json_to_abap.
DATA lt_mock TYPE TABLE OF string_table.
DATA lt_exp TYPE TABLE OF string_table.
DATA lt_mock TYPE STANDARD TABLE OF string_table.
DATA lt_exp TYPE STANDARD TABLE OF string_table.
DATA lt_tmp TYPE string_table.
DATA lo_nodes TYPE REF TO lcl_nodes_helper.
@ -3544,8 +3544,8 @@ CLASS ltcl_integrated IMPLEMENTATION.
METHOD array_index.
DATA lt_act TYPE TABLE OF ty_loc.
DATA lt_exp TYPE TABLE OF ty_loc.
DATA lt_act TYPE STANDARD TABLE OF ty_loc.
DATA lt_exp TYPE STANDARD TABLE OF ty_loc.
DATA ls_exp TYPE ty_loc.
DATA lv_src TYPE string.
@ -4197,7 +4197,7 @@ CLASS ltcl_abap_to_json IMPLEMENTATION.
DATA lo_nodes_exp TYPE REF TO lcl_nodes_helper.
DATA lt_nodes TYPE z2ui5_if_ajson_types=>ty_nodes_tt.
DATA lt_tab TYPE TABLE OF ty_struc.
DATA lt_tab TYPE STANDARD TABLE OF ty_struc.
FIELD-SYMBOLS <s> LIKE LINE OF lt_tab.
APPEND INITIAL LINE TO lt_tab ASSIGNING <s>.
@ -4265,7 +4265,7 @@ CLASS ltcl_filter_test DEFINITION FINAL
type TYPE z2ui5_if_ajson_filter=>ty_visit_type,
END OF ty_visit_history.
DATA mt_visit_history TYPE TABLE OF ty_visit_history.
DATA mt_visit_history TYPE STANDARD TABLE OF ty_visit_history.
METHODS simple_test FOR TESTING RAISING z2ui5_cx_ajson_error.
METHODS array_test FOR TESTING RAISING z2ui5_cx_ajson_error.

View File

@ -199,7 +199,7 @@ class lcl_mapping_camel implementation. "DEPRECATED
method z2ui5_if_ajson_mapping~to_json.
types ty_token type c length 255.
data lt_tokens type standard table of ty_token.
data lt_tokens TYPE STANDARD TABLE OF ty_token.
data lv_from type i.
field-symbols <token> like line of lt_tokens.
@ -302,7 +302,7 @@ class lcl_to_camel implementation.
types lty_token type c length 255.
constants lc_forced_underscore_marker type c length 1 value cl_abap_char_utilities=>horizontal_tab.
data lt_tokens type standard table of lty_token.
data lt_tokens TYPE STANDARD TABLE OF lty_token.
data lv_from type i.
field-symbols <token> like line of lt_tokens.

View File

@ -1,7 +1,7 @@
interface z2ui5_if_ajson_filter
public.
types ty_filter_tab type standard table of ref to z2ui5_if_ajson_filter with key table_line.
types ty_filter_tab TYPE STANDARD TABLE OF ref to z2ui5_if_ajson_filter with key table_line.
types ty_visit_type type i.
constants:

View File

@ -25,7 +25,7 @@ interface z2ui5_if_ajson_types
children type i,
end of ty_node.
types:
ty_nodes_tt type standard table of ty_node with key path name.
ty_nodes_tt TYPE STANDARD TABLE OF ty_node with key path name.
types:
ty_nodes_ts type sorted table of ty_node
with unique key path name

View File

@ -88,7 +88,8 @@ CLASS z2ui5_cl_core_app_startup IMPLEMENTATION.
)->button( text = `Debugging Tools` icon = `sap-icon://enablement`
press = client->_event( `OPEN_DEBUG` )
)->button( text = `System` icon = `sap-icon://information`
press = client->_event( `OPEN_INFO` ) ).
press = client->_event( `OPEN_INFO` )
).
DATA(simple_form2) = page2->simple_form(
editable = abap_true
@ -160,7 +161,7 @@ CLASS z2ui5_cl_core_app_startup IMPLEMENTATION.
simple_form2->label( `App Finder` ).
simple_form2->button(
text = `Start & Install Apps`
press = client->_event_client( val = client->cs_event-open_new_tab t_arg = VALUE #( ( lv_url_samples3 ) ) )
press = client->_event_client( val = client->cs_event-open_new_tab t_arg = VALUE #( ( lv_url_samples3 ) ) )
width = `70%` ).
IF z2ui5_cl_util=>rtti_check_class_exists( `z2ui5_cl_demo_app_000` ).
@ -191,23 +192,38 @@ CLASS z2ui5_cl_core_app_startup IMPLEMENTATION.
target = `_blank`
href = `https://github.com/abap2UI5/abap2UI5/issues` ).
simple_form2->label( `` ).
simple_form2->text( `` ).
* simple_form2->label( `` ).
* simple_form2->text( `` ).
* simple_form2->toolbar( )->title( `Links & More` ).
simple_form2->label( `Links & More` ).
simple_form2->toolbar( )->title( `The Project` ).
* simple_form2->label( `Links & More` ).
simple_form2->label( `Social` ).
simple_form2->link( text = `Repository on GitHub`
target = `_blank`
href = `https://github.com/abap2UI5/abap2UI5` ).
simple_form2->label( ).
simple_form2->link( text = `News on Twitter`
target = `_blank`
href = `https://twitter.com/abap2UI5` ).
simple_form2->label( ).
simple_form2->link( text = `Blog Series on SAP Community`
target = `_blank`
href = `https://community.sap.com/t5/technology-blogs-by-members/abap2ui5-1-introduction-developing-ui5-apps-purely-in-abap/ba-p/13567635` ).
simple_form2->label( ).
simple_form2->link( text = `News on Twitter`
target = `_blank`
href = `https://twitter.com/abap2UI5` ).
simple_form2->label( `` ).
simple_form2->text( `` ).
* simple_form2->label( `Social` ).
simple_form2->label( `Feedback` ).
simple_form2->link( text = `Contact`
target = `_blank`
href = `https://github.com/oblomov-dev` ).
client->view_display( page2->stringify( ) ).
ENDMETHOD.

View File

@ -13,7 +13,7 @@ CLASS z2ui5_cl_cc_imagemapster DEFINITION
list_key TYPE string,
list_selected_attribute TYPE string,
list_selected_class TYPE string,
* areas TYPE TABLE OF ty_c,
* areas TYPE STANDARD TABLE OF ty_c,
single_select TYPE abap_bool,
wrap_class TYPE string,
wrap_css TYPE string,

View File

@ -9,19 +9,17 @@ CLASS z2ui5_cl_popup_error DEFINITION
CLASS-METHODS factory
IMPORTING
error TYPE REF TO cx_root
i_title TYPE string DEFAULT `Error View`
i_icon TYPE string DEFAULT 'sap-icon://question-mark'
i_button_text TYPE string DEFAULT `OK`
x_root TYPE REF TO cx_root
RETURNING
VALUE(r_result) TYPE REF TO z2ui5_cl_popup_error.
PROTECTED SECTION.
DATA client TYPE REF TO z2ui5_if_client.
DATA title TYPE string.
DATA icon TYPE string.
DATA question_text TYPE string.
DATA button_text_confirm TYPE string.
DATA error TYPE REF TO cx_root.
* DATA title TYPE string.
* DATA icon TYPE string.
* DATA question_text TYPE string.
* DATA button_text_confirm TYPE string.
DATA check_initialized TYPE abap_bool.
METHODS view_display.
PRIVATE SECTION.
@ -34,13 +32,7 @@ CLASS z2ui5_cl_popup_error IMPLEMENTATION.
METHOD factory.
r_result = NEW #( ).
r_result->title = i_title.
r_result->icon = i_icon.
IF error->previous IS BOUND.
r_result->question_text = error->previous->get_text( ).
ENDIF.
r_result->question_text = r_result->question_text && ` ` && error->get_text( ).
r_result->button_text_confirm = i_button_text.
r_result->error = x_root.
ENDMETHOD.
@ -48,22 +40,19 @@ CLASS z2ui5_cl_popup_error IMPLEMENTATION.
METHOD view_display.
DATA(popup) = z2ui5_cl_xml_view=>factory_popup( )->dialog(
title = title
icon = icon
title = `Error View`
* icon = icon
afterclose = client->_event( 'BUTTON_CONFIRM' )
)->content(
)->vbox( 'sapUiMediumMargin'
* )->text( question_text
)->html( question_text
)->get_parent( )->get_parent( )->get_parent(
)->footer( )->overflow_toolbar(
)->toolbar_spacer(
)->text( error->get_text( )
)->get_parent( )->get_parent(
)->buttons(
)->button(
text = button_text_confirm
text = `OK`
press = client->_event( 'BUTTON_CONFIRM' )
type = 'Emphasized' ).
client->clear( client->cs_clear-view ).
client->popup_display( popup->stringify( ) ).
ENDMETHOD.
@ -82,7 +71,7 @@ CLASS z2ui5_cl_popup_error IMPLEMENTATION.
CASE client->get( )-event.
WHEN `BUTTON_CONFIRM`.
client->popup_destroy( ).
client->nav_app_leave( client->get_app( client->get( )-s_draft-id_prev_app_stack ) ).
client->nav_app_leave( ).
WHEN OTHERS.
ENDCASE.

View File

@ -99,8 +99,7 @@ CLASS Z2UI5_CL_POPUP_FILE_DOWNLOAD IMPLEMENTATION.
)->input( value = mv_size
enabled = abap_false
)->get_parent( )->get_parent(
)->footer( )->overflow_toolbar(
)->toolbar_spacer(
)->buttons(
)->button(
text = button_text_cancel
press = client->_event( 'BUTTON_CANCEL' )

View File

@ -83,8 +83,7 @@ CLASS z2ui5_cl_popup_file_upload IMPLEMENTATION.
placeholder = 'filepath here...'
upload = client->_event( 'UPLOAD' )
)->get_parent( )->get_parent(
)->footer( )->overflow_toolbar(
)->toolbar_spacer(
)->buttons(
)->button(
text = button_text_cancel
press = client->_event( 'BUTTON_CANCEL' )

View File

@ -102,7 +102,8 @@ CLASS Z2UI5_CL_POPUP_GET_RANGE IMPLEMENTATION.
type = `Transparent`
press = client->_event( val = `POPUP_DELETE` t_arg = VALUE #( ( `${KEY}` ) ) ) ).
lo_popup->footer( )->overflow_toolbar(
lo_popup->buttons(
* )->begin_button(
)->button( text = `Delete All`
icon = 'sap-icon://delete'
type = `Transparent`
@ -110,7 +111,8 @@ CLASS Z2UI5_CL_POPUP_GET_RANGE IMPLEMENTATION.
)->button( text = `Add Item`
icon = `sap-icon://add`
press = client->_event( val = `POPUP_ADD` )
)->toolbar_spacer(
* )->get_parent(
* )->end_button(
)->button(
text = 'Cancel'
press = client->_event( 'BUTTON_CANCEL' )

View File

@ -190,19 +190,19 @@ CLASS Z2UI5_CL_POPUP_GET_RANGE_MULTI IMPLEMENTATION.
text = `Clear`
press = client->_event( val = `LIST_DELETE` t_arg = VALUE #( ( `${NAME}` ) ) ) ).
lo_popup->footer( )->overflow_toolbar(
lo_popup->buttons(
)->button( text = `Clear All`
icon = 'sap-icon://delete'
type = `Transparent`
press = client->_event( val = `POPUP_DELETE_ALL` )
)->toolbar_spacer(
* )->toolbar_spacer(
)->button( text = 'DB Read'
press = client->_event( 'BUTTON_DB_READ' )
icon = 'sap-icon://download-from-cloud'
)->button( text = 'DB Save'
press = client->_event( 'BUTTON_DB_SAVE' )
icon = 'sap-icon://save'
)->toolbar_spacer(
* )->toolbar_spacer(
)->button( text = 'Cancel'
press = client->_event( 'BUTTON_CANCEL' )
)->button( text = 'OK'

View File

@ -80,8 +80,7 @@ CLASS Z2UI5_CL_POPUP_INPUT_VALUE IMPLEMENTATION.
value = client->_bind_edit( ms_result-value )
submit = client->_event( 'BUTTON_CONFIRM' )
)->get_parent( )->get_parent(
)->footer( )->overflow_toolbar(
)->toolbar_spacer(
)->buttons(
)->button(
text = button_text_cancel
press = client->_event( 'BUTTON_CANCEL' )

View File

@ -72,8 +72,7 @@ CLASS z2ui5_cl_popup_messages IMPLEMENTATION.
)->text( '{NUMBER}'
)->text( '{MESSAGE}'
)->get_parent( )->get_parent( )->get_parent( )->get_parent(
)->footer( )->overflow_toolbar(
)->toolbar_spacer(
)->buttons(
)->button(
text = 'continue'
press = client->_event( 'BUTTON_CONTINUE' )

View File

@ -84,8 +84,7 @@ CLASS Z2UI5_CL_POPUP_PDF IMPLEMENTATION.
( n = `width` v = `99%` )
)
)->get_parent( )->get_parent( )->get_parent(
)->footer( )->overflow_toolbar(
)->toolbar_spacer(
)->buttons(
)->button(
text = button_text_cancel
press = client->_event( 'BUTTON_CANCEL' )

View File

@ -54,12 +54,6 @@ CLASS z2ui5_cl_popup_table IMPLEMENTATION.
DATA(tab) = popup->table(
client->_bind( <tab_out> ) ).
* )->header_toolbar(
* )->overflow_toolbar(
* )->toolbar_spacer(
* )->button( text = `Filter` press = client->_event( `PREVIEW_FILTER` ) icon = `sap-icon://filter`
* )->button( text = `Display Popup` press = client->_event( `BUTTON_START` ) type = `Emphasized`
* )->get_parent( )->get_parent( ).
DATA(lt_comp) = z2ui5_cl_util=>rtti_get_t_attri_by_struc( <tab_out> ).
@ -76,11 +70,7 @@ CLASS z2ui5_cl_popup_table IMPLEMENTATION.
ENDLOOP.
popup->get_parent(
)->footer( )->overflow_toolbar(
)->toolbar_spacer(
* )->button(
* text = 'Cancel'
* press = client->_event( 'BUTTON_TEXTAREA_CANCEL' )
)->buttons(
)->button(
text = 'OK'
press = client->_event( 'BUTTON_CONFIRM' )

View File

@ -59,8 +59,7 @@ CLASS z2ui5_cl_popup_textedit IMPLEMENTATION.
width = '100%'
value = client->_bind_edit( ms_result-text )
)->get_parent(
)->footer( )->overflow_toolbar(
)->toolbar_spacer(
)->buttons(
)->button(
text = 'Cancel'
press = client->_event( 'BUTTON_TEXTAREA_CANCEL' )

View File

@ -70,8 +70,7 @@ CLASS z2ui5_cl_popup_to_confirm IMPLEMENTATION.
)->vbox( 'sapUiMediumMargin'
)->text( question_text
)->get_parent( )->get_parent(
)->footer( )->overflow_toolbar(
)->toolbar_spacer(
)->buttons(
)->button(
text = button_text_cancel
press = client->_event( 'BUTTON_CANCEL' )

View File

@ -52,8 +52,7 @@ CLASS z2ui5_cl_popup_to_inform IMPLEMENTATION.
)->vbox( 'sapUiMediumMargin'
)->text( question_text
)->get_parent( )->get_parent(
)->footer( )->overflow_toolbar(
)->toolbar_spacer(
)->buttons(
)->button(
text = button_text_confirm
press = client->_event( 'BUTTON_CONFIRM' )

View File

@ -6,7 +6,7 @@ INTERFACE z2ui5_if_types
n TYPE string,
v TYPE string,
END OF ty_s_name_value.
TYPES ty_t_name_value TYPE TABLE OF ty_s_name_value WITH EMPTY KEY.
TYPES ty_t_name_value TYPE STANDARD TABLE OF ty_s_name_value WITH EMPTY KEY.
TYPES:
BEGIN OF ty_s_http_request_get,