Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
oblomov-dev committed Feb 21, 2024
1 parent e446f45 commit 68274ad
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 24 deletions.
4 changes: 2 additions & 2 deletions src/z2ui5_cl_demo_app_000.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ CLASS z2ui5_cl_demo_app_000 IMPLEMENTATION.
CASE client->get( )-event.

WHEN 'BACK'.
client->nav_app_leave( client->get_app( client->get( )-s_draft-id_prev_app_stack ) ).
client->nav_app_leave( ).

WHEN OTHERS.
TRY.
Expand All @@ -61,7 +61,7 @@ CLASS z2ui5_cl_demo_app_000 IMPLEMENTATION.
shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL )
)->header_content(
)->toolbar_spacer(
)->link( text = 'SCN' target = '_blank' href = 'https://blogs.sap.com/tag/abap2ui5/'
)->link( text = 'SCN' target = '_blank' href = 'https://community.sap.com/t5/technology-blogs-by-members/abap2ui5-1-introduction-developing-ui5-apps-purely-in-abap/ba-p/13567635'
)->link( text = 'Twitter' target = '_blank' href = 'https://twitter.com/abap2UI5'
)->link( text = 'GitHub' target = '_blank' href = 'https://github.com/oblomov-dev/abap2ui5'
)->get_parent( ).
Expand Down
1 change: 0 additions & 1 deletion src/z2ui5_cl_demo_app_001.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ CLASS Z2UI5_CL_DEMO_APP_001 IMPLEMENTATION.

WHEN 'BACK'.
client->nav_app_leave( ).
* client->get_app( client->get( )-s_draft-id_prev_app_stack ) ).

ENDCASE.

Expand Down
9 changes: 3 additions & 6 deletions src/z2ui5_cl_demo_app_002.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ CLASS z2ui5_cl_demo_app_002 IMPLEMENTATION.
CLEAR screen.
client->message_toast_display( 'View initialized' ).
WHEN 'BACK'.
client->nav_app_leave( client->get_app( client->get( )-s_draft-id_prev_app_stack ) ).
client->nav_app_leave( ).

ENDCASE.

Expand Down Expand Up @@ -118,12 +118,9 @@ CLASS z2ui5_cl_demo_app_002 IMPLEMENTATION.
showheader = xsdbool( abap_false = client->get( )-check_launchpad_active )
title = 'abap2UI5 - Selection-Screen Example'
navbuttonpress = client->_event( 'BACK' )
shownavbutton = abap_true ).
shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL )
).

page->header_content(
)->link( text = 'Demo' target = '_blank' href = `https://twitter.com/abap2UI5/status/1628701535222865922`
)->link( text = 'Source_Code' target = '_blank' href = z2ui5_cl_demo_utility=>factory( client )->app_get_url_source_code( )
)->get_parent( ).
DATA(grid) = page->grid( 'L6 M12 S12'
)->content( 'layout' ).

Expand Down
9 changes: 2 additions & 7 deletions src/z2ui5_cl_demo_app_003.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,7 @@ CLASS Z2UI5_CL_DEMO_APP_003 IMPLEMENTATION.
)->page(
title = 'abap2UI5 - List'
navbuttonpress = client->_event( 'BACK' )
shownavbutton = abap_true
)->header_content(
)->link(
text = 'Source_Code' target = '_blank'
href = z2ui5_cl_demo_utility=>factory( client )->app_get_url_source_code( )
)->get_parent( ).
shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ).

page->list(
headertext = 'List Ouput'
Expand Down Expand Up @@ -79,7 +74,7 @@ CLASS Z2UI5_CL_DEMO_APP_003 IMPLEMENTATION.
client->message_box_display( `go to details for item ` && lt_sel[ 1 ]-title ).

WHEN 'BACK'.
client->nav_app_leave( client->get_app( client->get( )-s_draft-id_prev_app_stack ) ).
client->nav_app_leave( ).
ENDCASE.

ENDMETHOD.
Expand Down
11 changes: 3 additions & 8 deletions src/z2ui5_cl_demo_app_004.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ CLASS z2ui5_cl_demo_app_004 IMPLEMENTATION.
DATA(lv_dummy) = 1 / 0.

WHEN 'BACK'.
client->nav_app_leave( client->get_app( client->get( )-s_draft-id_prev_app_stack ) ).
client->nav_app_leave( ).

ENDCASE.

Expand All @@ -67,13 +67,8 @@ CLASS z2ui5_cl_demo_app_004 IMPLEMENTATION.
)->page(
title = 'abap2UI5 - Controller'
navbuttonpress = client->_event( val = 'BACK' check_view_destroy = abap_true )
shownavbutton = abap_true
)->header_content(
)->link(
text = 'Source_Code'
href = z2ui5_cl_demo_utility=>factory( client )->app_get_url_source_code( )
target = '_blank'
)->get_parent( ).
shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL )
).

page->grid( 'L6 M12 S12' )->content( 'layout'
)->simple_form( 'Controller' )->content( 'form'
Expand Down

0 comments on commit 68274ad

Please sign in to comment.