Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
oblomov-dev committed Mar 20, 2024
1 parent f49f376 commit b94e9b8
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/z2ui5_cl_demo_app_009.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ CLASS Z2UI5_CL_DEMO_APP_009 IMPLEMENTATION.
CLEAR screen.
client->message_box_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
6 changes: 3 additions & 3 deletions src/z2ui5_cl_demo_app_010.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ CLASS Z2UI5_CL_DEMO_APP_010 IMPLEMENTATION.

DATA(page) = z2ui5_cl_xml_view=>factory( )->shell(
)->page(
title = 'abap2UI5 - Demo Layout'
navbuttonpress = client->_event( 'BACK' )
shownavbutton = abap_true
title = 'abap2UI5 - Demo Layout'
navbuttonpress = client->_event( 'BACK' )
shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL )
).

page->header_content(
Expand Down
13 changes: 8 additions & 5 deletions src/z2ui5_cl_demo_app_180.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ CLASS z2ui5_cl_demo_app_180 IMPLEMENTATION.
mv_url = `https://www.google.com`.

client->view_model_update( ).

client->follow_up_action( custom_js = client->_event_client( val = client->cs_event-open_new_tab t_arg = VALUE #( ( mv_url ) ) ) ).

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

ENDCASE.

ENDMETHOD.
Expand All @@ -54,17 +54,20 @@ CLASS z2ui5_cl_demo_app_180 IMPLEMENTATION.
DATA(view) = z2ui5_cl_xml_view=>factory( ).
view->_generic( name = `script` ns = `html` )->_cc_plain_xml( `sap.z2ui5.afterBE = () => { alert("afterBE triggered !!"); }` ).

DATA(page) = view->shell( )->page( title = `Client->FOLLOW_UP_ACTION use cases` class = `sapUiContentPadding` ).
DATA(page) = view->shell( )->page(
title = `Client->FOLLOW_UP_ACTION use cases`
class = `sapUiContentPadding`
navbuttonpress = client->_event( 'BACK' )
shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL )
).
page = page->vbox( ).
page->button( text = `call frontend event from backend event` press = client->_event( `CALL_EF` ) ).
page->label( text = `MV_URL was set AFTER backend event and model update to:` ).
page->label( text = client->_bind_edit( mv_url ) ).

page->get_parent( )->hbox( class = `sapUiSmallMargin` ).
* page = page->vbox( ).
page->button( text = `call custom JS from EB` press = client->_event( 'CUSTOM_JS_FROM_EB' ) ).


client->view_display( view->stringify( ) ).

ENDMETHOD.
Expand Down
14 changes: 10 additions & 4 deletions src/z2ui5_cl_demo_app_181.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ CLASS Z2UI5_CL_DEMO_APP_181 IMPLEMENTATION.
client->message_toast_display( 'BOOKED !!! ENJOY' ).

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

Expand All @@ -62,7 +62,14 @@ CLASS Z2UI5_CL_DEMO_APP_181 IMPLEMENTATION.

DATA(view) = z2ui5_cl_xml_view=>factory( ).

DATA(card_1) = view->card( width = `300px` class = `sapUiMediumMargin`
data(page) = view->page(
title = `Cards Demo`
class = `sapUiContentPadding`
navbuttonpress = client->_event( 'BACK' )
shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL )
).

DATA(card_1) = page->card( width = `300px` class = `sapUiMediumMargin`
)->header( ns = `f`
)->card_header( title = `Buy bus ticket on-line`
subtitle = `Buy a single-ride ticket for a date`
Expand Down Expand Up @@ -105,7 +112,7 @@ CLASS Z2UI5_CL_DEMO_APP_181 IMPLEMENTATION.
class = `sapUiTinyMarginBegin` ).


DATA(card_2) = view->card( width = `300px` class = `sapUiMediumMargin`
DATA(card_2) = page->card( width = `300px` class = `sapUiMediumMargin`
)->header( ns = `f`
)->card_header( title = `Project Cloud Transformation`
subtitle = `Revenue per Product | EUR`
Expand All @@ -121,7 +128,6 @@ CLASS Z2UI5_CL_DEMO_APP_181 IMPLEMENTATION.
)->custom_list_item(
)->hbox( alignitems = `Center` justifycontent = `SpaceBetween`
)->vbox( class = `sapUiSmallMarginBegin sapUiSmallMarginTopBottom`
* )->label( text = `{TITLE}`
)->title( text = `{TITLE}` titlestyle = `H3`
)->text( text = `{SUBTITLE}`
)->get_parent(
Expand Down

0 comments on commit b94e9b8

Please sign in to comment.