mirror of
https://github.com/abap2UI5/abap2UI5.git
synced 2025-04-29 22:09:24 +08:00
parent
9b48c01acd
commit
9f4e862812
|
@ -21,7 +21,7 @@ ENDCLASS.
|
|||
|
||||
|
||||
|
||||
CLASS Z2UI5_CL_CORE_APP_ERROR IMPLEMENTATION.
|
||||
CLASS z2ui5_cl_core_app_error IMPLEMENTATION.
|
||||
|
||||
|
||||
METHOD factory.
|
||||
|
@ -34,10 +34,8 @@ CLASS Z2UI5_CL_CORE_APP_ERROR IMPLEMENTATION.
|
|||
|
||||
METHOD z2ui5_if_app~main.
|
||||
|
||||
DATA(lv_url) = shift_left( val = client->get( )-s_config-origin && client->get( )-s_config-pathname
|
||||
sub = ` ` ).
|
||||
DATA(lv_url) = shift_left( val = client->get( )-s_config-origin && client->get( )-s_config-pathname sub = ` ` ).
|
||||
DATA(lv_url_app) = lv_url && client->get( )-s_config-search.
|
||||
|
||||
DATA(lv_text) = ``.
|
||||
DATA(lx_error) = mx_error.
|
||||
WHILE lx_error IS BOUND.
|
||||
|
@ -45,38 +43,24 @@ CLASS Z2UI5_CL_CORE_APP_ERROR IMPLEMENTATION.
|
|||
lx_error = lx_error->previous.
|
||||
ENDWHILE.
|
||||
|
||||
* DATA(view) = z2ui5_cl_ui5=>_factory( )->_ns_m( )->shell( )->illustratedmessage(
|
||||
* enableformattedtext = abap_true
|
||||
* illustrationtype = `sapIllus-ErrorScreen`
|
||||
* title = `500 Internal Server Error`
|
||||
* description = lv_text
|
||||
* )->additionalcontent(
|
||||
* )->button(
|
||||
* text = `Home`
|
||||
* type = `Emphasized`
|
||||
* press = client->_event_client( val = client->cs_event-location_reload t_arg = VALUE #( ( lv_url ) ) )
|
||||
* )->button(
|
||||
* text = `Restart`
|
||||
* press = client->_event_client( val = client->cs_event-location_reload t_arg = VALUE #( ( lv_url_app ) ) ) ).
|
||||
|
||||
DATA(view) = z2ui5_cl_xml_view=>factory( ).
|
||||
|
||||
data(vbox) = view->shell( )->vbox( alignItems = `Center` ).
|
||||
|
||||
DATA(vbox) = view->shell( )->vbox( alignitems = `Center` ).
|
||||
vbox->text( ).
|
||||
vbox->title( `500 Internal Server Error` ).
|
||||
vbox->icon( src = `sap-icon://status-error` ).
|
||||
vbox->hbox(
|
||||
)->icon( src = `sap-icon://alert`
|
||||
)->text(
|
||||
)->title( `500 Internal Server Error`
|
||||
)->text(
|
||||
)->icon( src = `sap-icon://alert` ).
|
||||
vbox->formatted_text( lv_text ).
|
||||
vbox->hbox(
|
||||
)->button(
|
||||
text = `Home`
|
||||
type = `Emphasized`
|
||||
press = client->_event_client( val = client->cs_event-location_reload t_arg = VALUE #( ( lv_url ) ) )
|
||||
press = client->_event_client( val = client->cs_event-location_reload t_arg = VALUE #( ( lv_url ) ) )
|
||||
)->button(
|
||||
text = `Restart`
|
||||
press = client->_event_client( val = client->cs_event-location_reload t_arg = VALUE #( ( lv_url_app ) ) ) ).
|
||||
|
||||
|
||||
press = client->_event_client( val = client->cs_event-location_reload t_arg = VALUE #( ( lv_url_app ) ) ) ).
|
||||
client->view_display( view->stringify( ) ).
|
||||
client->popup_destroy( ).
|
||||
|
||||
|
|
|
@ -128,18 +128,10 @@ CLASS z2ui5_cl_core_app_search IMPLEMENTATION.
|
|||
|
||||
METHOD view_display.
|
||||
|
||||
DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( )->page( `abap2UI5 - App Finder`
|
||||
)->content( ).
|
||||
|
||||
DATA(page) = z2ui5_cl_xml_view=>factory(
|
||||
)->shell(
|
||||
)->tool_page(
|
||||
)->header( `tnt`
|
||||
)->tool_header(
|
||||
)->title( `abap2UI5 - App Finder`
|
||||
)->get_parent(
|
||||
)->get_parent( )->sub_header( `tnt`
|
||||
)->tool_header( ).
|
||||
|
||||
DATA(pages) = page->icon_tab_header( selectedkey = client->_bind_edit( mv_selected_key )
|
||||
page->icon_tab_header( selectedkey = client->_bind_edit( mv_selected_key )
|
||||
select = client->_event_client(
|
||||
val = client->cs_event-nav_container_to
|
||||
t_arg = VALUE #( ( `NavCon` ) ( `${$parameters>/selectedKey}` ) ) )
|
||||
|
@ -153,9 +145,8 @@ CLASS z2ui5_cl_core_app_search IMPLEMENTATION.
|
|||
text = `Apps on GitHub` )->get_parent(
|
||||
)->icon_tab_filter( key = `page_addon`
|
||||
text = `Addons on GitHub`
|
||||
)->get_parent( )->get_parent( )->get_parent( )->get_parent( )->get_parent(
|
||||
)->main_contents(
|
||||
)->nav_container( id = `NavCon`
|
||||
).
|
||||
DATA(pages) = page->nav_container( id = `NavCon`
|
||||
initialpage = `page_favs`
|
||||
defaulttransitionname = `flip`
|
||||
)->pages( ).
|
||||
|
|
|
@ -156,10 +156,9 @@ 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 ) ) )
|
||||
width = `70%` ).
|
||||
text = `Start & Install Apps`
|
||||
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` ).
|
||||
simple_form2->label( `Start Developing` ).
|
||||
|
|
|
@ -22,12 +22,13 @@ CLASS z2ui5_cl_fw_cc_util IMPLEMENTATION.
|
|||
result = `sap.ui.define("z2ui5/Util" , ["sap/ui/core/Control"], (Control)=>{` && |\n| &&
|
||||
` "use strict";` && |\n| &&
|
||||
` return {` && |\n| &&
|
||||
* ` return Control.extend("z2ui5.Util", { ` && |\n| &&
|
||||
` DateCreateObject: (s) => new Date(s),` && |\n| &&
|
||||
` DateAbapTimestampToDate: (sTimestamp) => new sap.gantt.misc.Format.abapTimestampToDate(sTimestamp),` && |\n| &&
|
||||
` DateAbapDateToDateObject: (d) => new Date(d.slice(0, 4), parseInt(d.slice(4, 6)) - 1, d.slice(6, 8)),` && |\n| &&
|
||||
` DateAbapDateTimeToDateObject: (d, t = '000000') => new Date(d.slice(0, 4), ` && |\n| &&
|
||||
` parseInt(d.slice(4, 6)) - 1, d.slice(6, 8), t.slice(0, 2), t.slice(2, 4), t.slice(4, 6)),` && |\n| &&
|
||||
` };` && |\n| &&
|
||||
` };` && |\n| &&
|
||||
` });`.
|
||||
|
||||
ENDMETHOD.
|
||||
|
|
Loading…
Reference in New Issue
Block a user