mirror of
https://github.com/abapGit/abapGit.git
synced 2025-05-01 12:20:51 +08:00
tutorial to component (#3704)
This commit is contained in:
parent
59e36c47bd
commit
8bc12fef01
|
@ -1,35 +1,68 @@
|
||||||
CLASS zcl_abapgit_gui_page_tutorial DEFINITION
|
CLASS zcl_abapgit_gui_page_tutorial DEFINITION
|
||||||
PUBLIC
|
PUBLIC
|
||||||
FINAL
|
FINAL
|
||||||
INHERITING FROM zcl_abapgit_gui_page
|
INHERITING FROM zcl_abapgit_gui_component
|
||||||
CREATE PUBLIC.
|
CREATE PUBLIC.
|
||||||
|
|
||||||
PUBLIC SECTION.
|
PUBLIC SECTION.
|
||||||
METHODS constructor
|
INTERFACES zif_abapgit_gui_renderable.
|
||||||
RAISING zcx_abapgit_exception.
|
|
||||||
|
CLASS-METHODS create
|
||||||
|
RETURNING
|
||||||
|
VALUE(ri_page) TYPE REF TO zif_abapgit_gui_renderable
|
||||||
|
RAISING
|
||||||
|
zcx_abapgit_exception.
|
||||||
|
|
||||||
PROTECTED SECTION.
|
PROTECTED SECTION.
|
||||||
METHODS render_content REDEFINITION.
|
|
||||||
|
|
||||||
PRIVATE SECTION.
|
PRIVATE SECTION.
|
||||||
|
|
||||||
METHODS build_main_menu
|
CLASS-METHODS build_main_menu
|
||||||
RETURNING VALUE(ro_menu) TYPE REF TO zcl_abapgit_html_toolbar.
|
RETURNING
|
||||||
|
VALUE(ro_menu) TYPE REF TO zcl_abapgit_html_toolbar.
|
||||||
|
|
||||||
ENDCLASS.
|
ENDCLASS.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
CLASS zcl_abapgit_gui_page_tutorial IMPLEMENTATION.
|
CLASS ZCL_ABAPGIT_GUI_PAGE_TUTORIAL IMPLEMENTATION.
|
||||||
|
|
||||||
|
|
||||||
|
METHOD build_main_menu.
|
||||||
|
|
||||||
|
CREATE OBJECT ro_menu EXPORTING iv_id = 'toolbar-main'.
|
||||||
|
|
||||||
|
ro_menu->add(
|
||||||
|
iv_txt = zcl_abapgit_gui_buttons=>new_online( )
|
||||||
|
iv_act = zif_abapgit_definitions=>c_action-repo_newonline
|
||||||
|
)->add(
|
||||||
|
iv_txt = zcl_abapgit_gui_buttons=>new_offline( )
|
||||||
|
iv_act = zif_abapgit_definitions=>c_action-repo_newoffline
|
||||||
|
)->add(
|
||||||
|
iv_txt = zcl_abapgit_gui_buttons=>advanced( )
|
||||||
|
io_sub = zcl_abapgit_gui_chunk_lib=>advanced_submenu( )
|
||||||
|
)->add(
|
||||||
|
iv_txt = zcl_abapgit_gui_buttons=>help( )
|
||||||
|
io_sub = zcl_abapgit_gui_chunk_lib=>help_submenu( ) ).
|
||||||
|
|
||||||
METHOD constructor.
|
|
||||||
super->constructor( ).
|
|
||||||
ms_control-page_title = 'Tutorial'.
|
|
||||||
ms_control-page_menu = build_main_menu( ).
|
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
METHOD render_content.
|
METHOD create.
|
||||||
|
|
||||||
|
DATA lo_component TYPE REF TO zcl_abapgit_gui_page_tutorial.
|
||||||
|
|
||||||
|
CREATE OBJECT lo_component.
|
||||||
|
|
||||||
|
ri_page = zcl_abapgit_gui_page_hoc=>create(
|
||||||
|
iv_page_title = 'Tutorial'
|
||||||
|
io_page_menu = build_main_menu( )
|
||||||
|
ii_child_component = lo_component ).
|
||||||
|
|
||||||
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
|
METHOD zif_abapgit_gui_renderable~render.
|
||||||
|
|
||||||
DATA: lv_devclass TYPE tadir-devclass.
|
DATA: lv_devclass TYPE tadir-devclass.
|
||||||
|
|
||||||
|
@ -90,24 +123,4 @@ CLASS zcl_abapgit_gui_page_tutorial IMPLEMENTATION.
|
||||||
|
|
||||||
|
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
METHOD build_main_menu.
|
|
||||||
|
|
||||||
CREATE OBJECT ro_menu EXPORTING iv_id = 'toolbar-main'.
|
|
||||||
|
|
||||||
ro_menu->add(
|
|
||||||
iv_txt = zcl_abapgit_gui_buttons=>new_online( )
|
|
||||||
iv_act = zif_abapgit_definitions=>c_action-repo_newonline
|
|
||||||
)->add(
|
|
||||||
iv_txt = zcl_abapgit_gui_buttons=>new_offline( )
|
|
||||||
iv_act = zif_abapgit_definitions=>c_action-repo_newoffline
|
|
||||||
)->add(
|
|
||||||
iv_txt = zcl_abapgit_gui_buttons=>advanced( )
|
|
||||||
io_sub = zcl_abapgit_gui_chunk_lib=>advanced_submenu( )
|
|
||||||
)->add(
|
|
||||||
iv_txt = zcl_abapgit_gui_buttons=>help( )
|
|
||||||
io_sub = zcl_abapgit_gui_chunk_lib=>help_submenu( ) ).
|
|
||||||
|
|
||||||
ENDMETHOD.
|
|
||||||
|
|
||||||
ENDCLASS.
|
ENDCLASS.
|
||||||
|
|
|
@ -286,7 +286,7 @@ CLASS ZCL_ABAPGIT_GUI_ROUTER IMPLEMENTATION.
|
||||||
ei_page = get_page_branch_overview( is_event_data-getdata ).
|
ei_page = get_page_branch_overview( is_event_data-getdata ).
|
||||||
ev_state = zcl_abapgit_gui=>c_event_state-new_page.
|
ev_state = zcl_abapgit_gui=>c_event_state-new_page.
|
||||||
WHEN zif_abapgit_definitions=>c_action-go_tutorial. " Go to tutorial
|
WHEN zif_abapgit_definitions=>c_action-go_tutorial. " Go to tutorial
|
||||||
CREATE OBJECT ei_page TYPE zcl_abapgit_gui_page_tutorial.
|
ei_page = zcl_abapgit_gui_page_tutorial=>create( ).
|
||||||
ev_state = zcl_abapgit_gui=>c_event_state-new_page.
|
ev_state = zcl_abapgit_gui=>c_event_state-new_page.
|
||||||
WHEN zif_abapgit_definitions=>c_action-documentation. " abapGit docs
|
WHEN zif_abapgit_definitions=>c_action-documentation. " abapGit docs
|
||||||
zcl_abapgit_services_abapgit=>open_abapgit_wikipage( ).
|
zcl_abapgit_services_abapgit=>open_abapgit_wikipage( ).
|
||||||
|
|
Loading…
Reference in New Issue
Block a user