html, use interfaces (#3811)

* html, use interfaces

* more

* more

* more

* this removes the ADD_A alias
This commit is contained in:
Lars Hvam 2020-08-29 08:00:56 +02:00 committed by GitHub
parent 6f698c4c8b
commit 271e365f06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 223 additions and 224 deletions

View File

@ -8,8 +8,6 @@ CLASS zcl_abapgit_html DEFINITION
ALIASES add ALIASES add
FOR zif_abapgit_html~add . FOR zif_abapgit_html~add .
ALIASES add_a
FOR zif_abapgit_html~add_a .
ALIASES add_checkbox ALIASES add_checkbox
FOR zif_abapgit_html~add_checkbox . FOR zif_abapgit_html~add_checkbox .
ALIASES add_icon ALIASES add_icon
@ -102,21 +100,6 @@ CLASS ZCL_ABAPGIT_HTML IMPLEMENTATION.
ENDMETHOD. ENDMETHOD.
METHOD add_a.
add( zif_abapgit_html~a(
iv_txt = iv_txt
iv_act = iv_act
iv_typ = iv_typ
iv_opt = iv_opt
iv_class = iv_class
iv_id = iv_id
iv_style = iv_style
iv_title = iv_title ) ).
ENDMETHOD.
METHOD checkbox. METHOD checkbox.
DATA: lv_checked TYPE string. DATA: lv_checked TYPE string.
@ -349,6 +332,21 @@ CLASS ZCL_ABAPGIT_HTML IMPLEMENTATION.
ENDMETHOD. ENDMETHOD.
METHOD zif_abapgit_html~add_a.
add( zif_abapgit_html~a(
iv_txt = iv_txt
iv_act = iv_act
iv_typ = iv_typ
iv_opt = iv_opt
iv_class = iv_class
iv_id = iv_id
iv_style = iv_style
iv_title = iv_title ) ).
ENDMETHOD.
METHOD zif_abapgit_html~add_checkbox. METHOD zif_abapgit_html~add_checkbox.
add( checkbox( iv_id = iv_id add( checkbox( iv_id = iv_id

View File

@ -18,7 +18,7 @@ CLASS zcl_abapgit_gui_chunk_lib DEFINITION
!iv_error TYPE string OPTIONAL !iv_error TYPE string OPTIONAL
!iv_extra_style TYPE string OPTIONAL !iv_extra_style TYPE string OPTIONAL
RETURNING RETURNING
VALUE(ro_html) TYPE REF TO zcl_abapgit_html . VALUE(ri_html) TYPE REF TO zif_abapgit_html .
CLASS-METHODS render_repo_top CLASS-METHODS render_repo_top
IMPORTING IMPORTING
!io_repo TYPE REF TO zcl_abapgit_repo !io_repo TYPE REF TO zcl_abapgit_repo
@ -28,7 +28,7 @@ CLASS zcl_abapgit_gui_chunk_lib DEFINITION
!iv_branch TYPE string OPTIONAL !iv_branch TYPE string OPTIONAL
!io_news TYPE REF TO zcl_abapgit_news OPTIONAL !io_news TYPE REF TO zcl_abapgit_news OPTIONAL
RETURNING RETURNING
VALUE(ro_html) TYPE REF TO zcl_abapgit_html VALUE(ri_html) TYPE REF TO zif_abapgit_html
RAISING RAISING
zcx_abapgit_exception . zcx_abapgit_exception .
CLASS-METHODS render_item_state CLASS-METHODS render_item_state
@ -39,7 +39,7 @@ CLASS zcl_abapgit_gui_chunk_lib DEFINITION
VALUE(rv_html) TYPE string . VALUE(rv_html) TYPE string .
CLASS-METHODS render_js_error_banner CLASS-METHODS render_js_error_banner
RETURNING RETURNING
VALUE(ro_html) TYPE REF TO zcl_abapgit_html VALUE(ri_html) TYPE REF TO zif_abapgit_html
RAISING RAISING
zcx_abapgit_exception . zcx_abapgit_exception .
CLASS-METHODS render_news CLASS-METHODS render_news
@ -61,7 +61,7 @@ CLASS zcl_abapgit_gui_chunk_lib DEFINITION
IMPORTING IMPORTING
!ix_error TYPE REF TO zcx_abapgit_exception !ix_error TYPE REF TO zcx_abapgit_exception
RETURNING RETURNING
VALUE(ro_html) TYPE REF TO zcl_abapgit_html . VALUE(ri_html) TYPE REF TO zif_abapgit_html .
CLASS-METHODS parse_change_order_by CLASS-METHODS parse_change_order_by
IMPORTING IMPORTING
!iv_query_str TYPE clike !iv_query_str TYPE clike
@ -100,7 +100,7 @@ CLASS zcl_abapgit_gui_chunk_lib DEFINITION
IMPORTING IMPORTING
!is_event TYPE ty_event_signature !is_event TYPE ty_event_signature
RETURNING RETURNING
VALUE(ro_html) TYPE REF TO zcl_abapgit_html . VALUE(ri_html) TYPE REF TO zif_abapgit_html .
CLASS-METHODS render_repo_palette CLASS-METHODS render_repo_palette
IMPORTING IMPORTING
!iv_action TYPE string !iv_action TYPE string
@ -115,15 +115,16 @@ CLASS zcl_abapgit_gui_chunk_lib DEFINITION
RETURNING RETURNING
VALUE(ro_menu) TYPE REF TO zcl_abapgit_html_toolbar . VALUE(ro_menu) TYPE REF TO zcl_abapgit_html_toolbar .
PROTECTED SECTION. PROTECTED SECTION.
CLASS-METHODS render_repo_top_commit_hash CLASS-METHODS render_repo_top_commit_hash
IMPORTING IMPORTING
iv_html TYPE REF TO zcl_abapgit_html !ii_html TYPE REF TO zif_abapgit_html
iv_repo_online TYPE REF TO zcl_abapgit_repo_online !iv_repo_online TYPE REF TO zcl_abapgit_repo_online
RAISING RAISING
zcx_abapgit_exception. zcx_abapgit_exception .
PRIVATE SECTION. PRIVATE SECTION.
CLASS-DATA gv_time_zone TYPE timezone.
CLASS-DATA gv_time_zone TYPE timezone .
CLASS-METHODS render_branch_span CLASS-METHODS render_branch_span
IMPORTING IMPORTING
@ -131,20 +132,20 @@ CLASS zcl_abapgit_gui_chunk_lib DEFINITION
!io_repo TYPE REF TO zcl_abapgit_repo_online !io_repo TYPE REF TO zcl_abapgit_repo_online
!iv_interactive TYPE abap_bool !iv_interactive TYPE abap_bool
RETURNING RETURNING
VALUE(ro_html) TYPE REF TO zcl_abapgit_html VALUE(ri_html) TYPE REF TO zif_abapgit_html
RAISING RAISING
zcx_abapgit_exception . zcx_abapgit_exception .
CLASS-METHODS get_t100_text CLASS-METHODS get_t100_text
IMPORTING IMPORTING
iv_msgid TYPE scx_t100key-msgid !iv_msgid TYPE scx_t100key-msgid
iv_msgno TYPE scx_t100key-msgno !iv_msgno TYPE scx_t100key-msgno
RETURNING RETURNING
VALUE(rv_text) TYPE string. VALUE(rv_text) TYPE string .
CLASS-METHODS normalize_program_name CLASS-METHODS normalize_program_name
IMPORTING IMPORTING
iv_program_name TYPE sy-repid !iv_program_name TYPE sy-repid
RETURNING RETURNING
VALUE(rv_normalized_program_name) TYPE string. VALUE(rv_normalized_program_name) TYPE string .
ENDCLASS. ENDCLASS.
@ -272,17 +273,17 @@ CLASS ZCL_ABAPGIT_GUI_CHUNK_LIB IMPLEMENTATION.
lv_class = 'branch'. lv_class = 'branch'.
ENDIF. ENDIF.
CREATE OBJECT ro_html. CREATE OBJECT ri_html TYPE zcl_abapgit_html.
ro_html->add( |<span class="{ lv_class }">| ). ri_html->add( |<span class="{ lv_class }">| ).
ro_html->add_icon( iv_name = 'code-branch/grey70' ri_html->add_icon( iv_name = 'code-branch/grey70'
iv_hint = 'Current branch' ). iv_hint = 'Current branch' ).
IF iv_interactive = abap_true. IF iv_interactive = abap_true.
ro_html->add_a( iv_act = |{ zif_abapgit_definitions=>c_action-git_branch_switch }?{ io_repo->get_key( ) }| ri_html->add_a( iv_act = |{ zif_abapgit_definitions=>c_action-git_branch_switch }?{ io_repo->get_key( ) }|
iv_txt = lv_text ). iv_txt = lv_text ).
ELSE. ELSE.
ro_html->add( lv_text ). ri_html->add( lv_text ).
ENDIF. ENDIF.
ro_html->add( '</span>' ). ri_html->add( '</span>' ).
ENDMETHOD. ENDMETHOD.
@ -314,7 +315,7 @@ CLASS ZCL_ABAPGIT_GUI_CHUNK_LIB IMPLEMENTATION.
lv_class = lv_class && ` ` && iv_extra_style. lv_class = lv_class && ` ` && iv_extra_style.
ENDIF. ENDIF.
CREATE OBJECT ro_html. CREATE OBJECT ri_html TYPE zcl_abapgit_html.
IF ix_error IS BOUND. IF ix_error IS BOUND.
lv_error = ix_error->get_text( ). lv_error = ix_error->get_text( ).
@ -322,9 +323,9 @@ CLASS ZCL_ABAPGIT_GUI_CHUNK_LIB IMPLEMENTATION.
lv_error = iv_error. lv_error = iv_error.
ENDIF. ENDIF.
ro_html->add( |<div class="{ lv_class }">| ). ri_html->add( |<div class="{ lv_class }">| ).
ro_html->add( |{ zcl_abapgit_html=>icon( 'exclamation-circle/red' ) } Error: { lv_error }| ). ri_html->add( |{ zcl_abapgit_html=>icon( 'exclamation-circle/red' ) } Error: { lv_error }| ).
ro_html->add( '</div>' ). ri_html->add( '</div>' ).
ENDMETHOD. ENDMETHOD.
@ -339,7 +340,7 @@ CLASS ZCL_ABAPGIT_GUI_CHUNK_LIB IMPLEMENTATION.
lv_text TYPE string. lv_text TYPE string.
CREATE OBJECT ro_html. CREATE OBJECT ri_html TYPE zcl_abapgit_html.
lv_error_text = ix_error->get_text( ). lv_error_text = ix_error->get_text( ).
lv_longtext = ix_error->get_longtext( abap_true ). lv_longtext = ix_error->get_longtext( abap_true ).
@ -360,19 +361,19 @@ CLASS ZCL_ABAPGIT_GUI_CHUNK_LIB IMPLEMENTATION.
IN lv_longtext IN lv_longtext
WITH |<h3>$1</h3>|. WITH |<h3>$1</h3>|.
ro_html->add( |<div id="message" class="message-panel">| ). ri_html->add( |<div id="message" class="message-panel">| ).
ro_html->add( |{ lv_error_text }| ). ri_html->add( |{ lv_error_text }| ).
ro_html->add( |<div class="float-right">| ). ri_html->add( |<div class="float-right">| ).
ro_html->add_a( ri_html->add_a(
iv_txt = `&#x274c;` iv_txt = `&#x274c;`
iv_act = `toggleDisplay('message')` iv_act = `toggleDisplay('message')`
iv_class = `close-btn` iv_class = `close-btn`
iv_typ = zif_abapgit_html=>c_action_type-onclick ). iv_typ = zif_abapgit_html=>c_action_type-onclick ).
ro_html->add( |</div>| ). ri_html->add( |</div>| ).
ro_html->add( |<div class="float-right message-panel-commands">| ). ri_html->add( |<div class="float-right message-panel-commands">| ).
IF ix_error->if_t100_message~t100key-msgid IS NOT INITIAL. IF ix_error->if_t100_message~t100key-msgid IS NOT INITIAL.
@ -382,7 +383,7 @@ CLASS ZCL_ABAPGIT_GUI_CHUNK_LIB IMPLEMENTATION.
lv_text = |Message ({ ix_error->if_t100_message~t100key-msgid }/{ ix_error->if_t100_message~t100key-msgno })|. lv_text = |Message ({ ix_error->if_t100_message~t100key-msgid }/{ ix_error->if_t100_message~t100key-msgno })|.
ro_html->add_a( ri_html->add_a(
iv_txt = lv_text iv_txt = lv_text
iv_typ = zif_abapgit_html=>c_action_type-sapevent iv_typ = zif_abapgit_html=>c_action_type-sapevent
iv_act = zif_abapgit_definitions=>c_action-goto_message iv_act = zif_abapgit_definitions=>c_action-goto_message
@ -395,32 +396,33 @@ CLASS ZCL_ABAPGIT_GUI_CHUNK_LIB IMPLEMENTATION.
lv_title = normalize_program_name( lv_program_name ). lv_title = normalize_program_name( lv_program_name ).
ro_html->add_a( ri_html->add_a(
iv_txt = `Goto source` iv_txt = `Goto source`
iv_act = zif_abapgit_definitions=>c_action-goto_source iv_act = zif_abapgit_definitions=>c_action-goto_source
iv_typ = zif_abapgit_html=>c_action_type-sapevent iv_typ = zif_abapgit_html=>c_action_type-sapevent
iv_title = lv_title iv_title = lv_title
iv_id = `a_goto_source` ). iv_id = `a_goto_source` ).
ro_html->add_a( ri_html->add_a(
iv_txt = `Callstack` iv_txt = `Callstack`
iv_act = zif_abapgit_definitions=>c_action-show_callstack iv_act = zif_abapgit_definitions=>c_action-show_callstack
iv_typ = zif_abapgit_html=>c_action_type-sapevent iv_typ = zif_abapgit_html=>c_action_type-sapevent
iv_id = `a_callstack` ). iv_id = `a_callstack` ).
ro_html->add( |</div>| ). ri_html->add( |</div>| ).
ro_html->add( |<div class="message-panel-commands">| ). ri_html->add( |<div class="message-panel-commands">| ).
ro_html->add( |{ lv_longtext }| ). ri_html->add( |{ lv_longtext }| ).
ro_html->add( |</div>| ). ri_html->add( |</div>| ).
ro_html->add( |</div>| ). ri_html->add( |</div>| ).
ENDMETHOD. ENDMETHOD.
METHOD render_event_as_form. METHOD render_event_as_form.
CREATE OBJECT ro_html. CREATE OBJECT ri_html TYPE zcl_abapgit_html.
ro_html->add(
ri_html->add(
|<form id='form_{ is_event-name }' method={ is_event-method } action='sapevent:{ is_event-name }'></form>| ). |<form id='form_{ is_event-name }' method={ is_event-method } action='sapevent:{ is_event-name }'></form>| ).
ENDMETHOD. ENDMETHOD.
@ -512,12 +514,12 @@ CLASS ZCL_ABAPGIT_GUI_CHUNK_LIB IMPLEMENTATION.
METHOD render_js_error_banner. METHOD render_js_error_banner.
CREATE OBJECT ro_html. CREATE OBJECT ri_html TYPE zcl_abapgit_html.
ro_html->add( '<div id="js-error-banner" class="dummydiv error">' ). ri_html->add( '<div id="js-error-banner" class="dummydiv error">' ).
ro_html->add( |{ zcl_abapgit_html=>icon( 'exclamation-triangle/red' ) }| && ri_html->add( |{ zcl_abapgit_html=>icon( 'exclamation-triangle/red' ) }| &&
' If this does not disappear soon,' && ' If this does not disappear soon,' &&
' then there is a JS init error, please log an issue' ). ' then there is a JS init error, please log an issue' ).
ro_html->add( '</div>' ). ri_html->add( '</div>' ).
ENDMETHOD. ENDMETHOD.
@ -671,7 +673,7 @@ CLASS ZCL_ABAPGIT_GUI_CHUNK_LIB IMPLEMENTATION.
lv_icon TYPE string, lv_icon TYPE string,
lv_package_jump_data TYPE string. lv_package_jump_data TYPE string.
CREATE OBJECT ro_html. CREATE OBJECT ri_html TYPE zcl_abapgit_html.
CREATE OBJECT lo_pback. CREATE OBJECT lo_pback.
IF io_repo->is_offline( ) = abap_true. IF io_repo->is_offline( ) = abap_true.
@ -682,23 +684,23 @@ CLASS ZCL_ABAPGIT_GUI_CHUNK_LIB IMPLEMENTATION.
lv_hint = 'On-line repository' ##NO_TEXT. lv_hint = 'On-line repository' ##NO_TEXT.
ENDIF. ENDIF.
ro_html->add( '<table class="w100"><tr>' ). ri_html->add( '<table class="w100"><tr>' ).
ro_html->add( '<td class="repo_name">' ). ri_html->add( '<td class="repo_name">' ).
" Repo type and name " Repo type and name
ro_html->add_icon( iv_name = lv_icon ri_html->add_icon( iv_name = lv_icon
iv_hint = lv_hint ). iv_hint = lv_hint ).
ro_html->add( |<span class="name">{ io_repo->get_name( ) }</span>| ). ri_html->add( |<span class="name">{ io_repo->get_name( ) }</span>| ).
IF io_repo->is_offline( ) = abap_false. IF io_repo->is_offline( ) = abap_false.
lo_repo_online ?= io_repo. lo_repo_online ?= io_repo.
ro_html->add_a( iv_txt = lo_repo_online->get_url( ) ri_html->add_a( iv_txt = lo_repo_online->get_url( )
iv_act = |{ zif_abapgit_definitions=>c_action-url }?| iv_act = |{ zif_abapgit_definitions=>c_action-url }?|
&& |{ lo_repo_online->get_url( ) }| && |{ lo_repo_online->get_url( ) }|
iv_class = |url| ). iv_class = |url| ).
render_repo_top_commit_hash( iv_html = ro_html render_repo_top_commit_hash( ii_html = ri_html
iv_repo_online = lo_repo_online ). iv_repo_online = lo_repo_online ).
ENDIF. ENDIF.
@ -710,15 +712,15 @@ CLASS ZCL_ABAPGIT_GUI_CHUNK_LIB IMPLEMENTATION.
ELSE. ELSE.
lv_icon = 'arrow-circle-up/grey80'. lv_icon = 'arrow-circle-up/grey80'.
ENDIF. ENDIF.
ro_html->add_a( iv_act = |toggleDisplay('news')| ri_html->add_a( iv_act = |toggleDisplay('news')|
iv_typ = zif_abapgit_html=>c_action_type-onclick iv_typ = zif_abapgit_html=>c_action_type-onclick
iv_txt = zcl_abapgit_html=>icon( iv_name = lv_icon iv_txt = zcl_abapgit_html=>icon( iv_name = lv_icon
iv_class = 'pad-sides' iv_class = 'pad-sides'
iv_hint = 'Display changelog' ) ). iv_hint = 'Display changelog' ) ).
ENDIF. ENDIF.
ro_html->add( '</td>' ). ri_html->add( '</td>' ).
ro_html->add( '<td class="repo_attr right">' ). ri_html->add( '<td class="repo_attr right">' ).
" Fav " Fav
IF abap_true = zcl_abapgit_persistence_user=>get_instance( )->is_favorite_repo( io_repo->get_key( ) ). IF abap_true = zcl_abapgit_persistence_user=>get_instance( )->is_favorite_repo( io_repo->get_key( ) ).
@ -726,19 +728,19 @@ CLASS ZCL_ABAPGIT_GUI_CHUNK_LIB IMPLEMENTATION.
ELSE. ELSE.
lv_icon = 'star/grey' ##NO_TEXT. lv_icon = 'star/grey' ##NO_TEXT.
ENDIF. ENDIF.
ro_html->add_a( iv_act = |{ zif_abapgit_definitions=>c_action-repo_toggle_fav }?{ io_repo->get_key( ) }| ri_html->add_a( iv_act = |{ zif_abapgit_definitions=>c_action-repo_toggle_fav }?{ io_repo->get_key( ) }|
iv_txt = zcl_abapgit_html=>icon( iv_name = lv_icon iv_txt = zcl_abapgit_html=>icon( iv_name = lv_icon
iv_class = 'pad-sides' iv_class = 'pad-sides'
iv_hint = 'Click to toggle favorite' ) ). iv_hint = 'Click to toggle favorite' ) ).
" BG " BG
IF lo_pback->exists( io_repo->get_key( ) ) = abap_true. IF lo_pback->exists( io_repo->get_key( ) ) = abap_true.
ro_html->add( '<span class="bg_marker" title="background">BG</span>' ). ri_html->add( '<span class="bg_marker" title="background">BG</span>' ).
ENDIF. ENDIF.
" Write protect " Write protect
IF io_repo->get_local_settings( )-write_protected = abap_true. IF io_repo->get_local_settings( )-write_protected = abap_true.
ro_html->add_icon( iv_name = 'lock/grey70' ri_html->add_icon( iv_name = 'lock/grey70'
iv_hint = 'Locked from pulls' ). iv_hint = 'Locked from pulls' ).
ENDIF. ENDIF.
@ -747,11 +749,11 @@ CLASS ZCL_ABAPGIT_GUI_CHUNK_LIB IMPLEMENTATION.
lo_repo_online ?= io_repo. lo_repo_online ?= io_repo.
IF iv_show_branch = abap_true. IF iv_show_branch = abap_true.
IF iv_branch IS INITIAL. IF iv_branch IS INITIAL.
ro_html->add( render_branch_span( iv_branch = lo_repo_online->get_branch_name( ) ri_html->add( render_branch_span( iv_branch = lo_repo_online->get_branch_name( )
io_repo = lo_repo_online io_repo = lo_repo_online
iv_interactive = iv_interactive_branch ) ). iv_interactive = iv_interactive_branch ) ).
ELSE. ELSE.
ro_html->add( render_branch_span( iv_branch = iv_branch ri_html->add( render_branch_span( iv_branch = iv_branch
io_repo = lo_repo_online io_repo = lo_repo_online
iv_interactive = iv_interactive_branch ) ). iv_interactive = iv_interactive_branch ) ).
ENDIF. ENDIF.
@ -760,21 +762,21 @@ CLASS ZCL_ABAPGIT_GUI_CHUNK_LIB IMPLEMENTATION.
" Package " Package
IF iv_show_package = abap_true. IF iv_show_package = abap_true.
ro_html->add_icon( iv_name = 'box/grey70' ri_html->add_icon( iv_name = 'box/grey70'
iv_hint = 'SAP package' ). iv_hint = 'SAP package' ).
ro_html->add( '<span>' ). ri_html->add( '<span>' ).
lv_package_jump_data = zcl_abapgit_html_action_utils=>jump_encode( lv_package_jump_data = zcl_abapgit_html_action_utils=>jump_encode(
iv_obj_type = 'DEVC' iv_obj_type = 'DEVC'
iv_obj_name = io_repo->get_package( ) ). iv_obj_name = io_repo->get_package( ) ).
ro_html->add_a( iv_txt = io_repo->get_package( ) ri_html->add_a( iv_txt = io_repo->get_package( )
iv_act = |{ zif_abapgit_definitions=>c_action-jump }?{ lv_package_jump_data }| ). iv_act = |{ zif_abapgit_definitions=>c_action-jump }?{ lv_package_jump_data }| ).
ro_html->add( '</span>' ). ri_html->add( '</span>' ).
ENDIF. ENDIF.
ro_html->add( '</td>' ). ri_html->add( '</td>' ).
ro_html->add( '</tr></table>' ). ri_html->add( '</tr></table>' ).
ENDMETHOD. ENDMETHOD.
@ -798,12 +800,12 @@ CLASS ZCL_ABAPGIT_GUI_CHUNK_LIB IMPLEMENTATION.
TRY. TRY.
lv_display_url = iv_repo_online->get_commit_display_url( lv_commit_hash ). lv_display_url = iv_repo_online->get_commit_display_url( lv_commit_hash ).
iv_html->add_a( iv_txt = |{ lv_icon_commit }{ lv_commit_short_hash }| ii_html->add_a( iv_txt = |{ lv_icon_commit }{ lv_commit_short_hash }|
iv_act = |{ zif_abapgit_definitions=>c_action-url }?| iv_act = |{ zif_abapgit_definitions=>c_action-url }?|
&& lv_display_url && lv_display_url
iv_class = |url| ). iv_class = |url| ).
CATCH zcx_abapgit_exception. CATCH zcx_abapgit_exception.
iv_html->add( |<span class="url">{ lv_icon_commit }{ lv_commit_short_hash }</span>| ). ii_html->add( |<span class="url">{ lv_icon_commit }{ lv_commit_short_hash }</span>| ).
ENDTRY. ENDTRY.
ENDMETHOD. ENDMETHOD.

View File

@ -28,57 +28,51 @@ CLASS zcl_abapgit_gui_page DEFINITION PUBLIC ABSTRACT
RAISING RAISING
zcx_abapgit_exception . zcx_abapgit_exception .
PRIVATE SECTION. PRIVATE SECTION.
DATA:
mo_settings TYPE REF TO zcl_abapgit_settings, DATA mo_settings TYPE REF TO zcl_abapgit_settings .
mx_error TYPE REF TO zcx_abapgit_exception, DATA mx_error TYPE REF TO zcx_abapgit_exception .
mo_exception_viewer TYPE REF TO zcl_abapgit_exception_viewer. DATA mo_exception_viewer TYPE REF TO zcl_abapgit_exception_viewer .
METHODS render_deferred_parts METHODS render_deferred_parts
IMPORTING IMPORTING
ii_html TYPE REF TO zif_abapgit_html !ii_html TYPE REF TO zif_abapgit_html
iv_part_category TYPE string !iv_part_category TYPE string
RAISING RAISING
zcx_abapgit_exception. zcx_abapgit_exception .
METHODS html_head METHODS html_head
RETURNING VALUE(ri_html) TYPE REF TO zif_abapgit_html. RETURNING
VALUE(ri_html) TYPE REF TO zif_abapgit_html .
METHODS title METHODS title
RETURNING VALUE(ri_html) TYPE REF TO zif_abapgit_html. RETURNING
VALUE(ri_html) TYPE REF TO zif_abapgit_html .
METHODS footer METHODS footer
RETURNING VALUE(ri_html) TYPE REF TO zif_abapgit_html. RETURNING
VALUE(ri_html) TYPE REF TO zif_abapgit_html .
METHODS render_link_hints METHODS render_link_hints
IMPORTING IMPORTING
ii_html TYPE REF TO zif_abapgit_html !ii_html TYPE REF TO zif_abapgit_html
RAISING RAISING
zcx_abapgit_exception. zcx_abapgit_exception .
METHODS render_command_palettes METHODS render_command_palettes
IMPORTING IMPORTING
ii_html TYPE REF TO zif_abapgit_html !ii_html TYPE REF TO zif_abapgit_html
RAISING RAISING
zcx_abapgit_exception. zcx_abapgit_exception .
METHODS render_hotkey_overview METHODS render_hotkey_overview
RETURNING RETURNING
VALUE(ro_html) TYPE REF TO zif_abapgit_html VALUE(ro_html) TYPE REF TO zif_abapgit_html
RAISING RAISING
zcx_abapgit_exception. zcx_abapgit_exception .
METHODS render_error_message_box METHODS render_error_message_box
RETURNING RETURNING
VALUE(ro_html) TYPE REF TO zcl_abapgit_html VALUE(ri_html) TYPE REF TO zif_abapgit_html
RAISING RAISING
zcx_abapgit_exception. zcx_abapgit_exception .
METHODS scripts METHODS scripts
RETURNING RETURNING
VALUE(ro_html) TYPE REF TO zcl_abapgit_html VALUE(ro_html) TYPE REF TO zcl_abapgit_html
RAISING RAISING
zcx_abapgit_exception. zcx_abapgit_exception .
ENDCLASS. ENDCLASS.
@ -183,7 +177,7 @@ CLASS ZCL_ABAPGIT_GUI_PAGE IMPLEMENTATION.
" You should remember that the we have to instantiate ro_html even " You should remember that the we have to instantiate ro_html even
" it's overwritten further down. Because ADD checks whether it's " it's overwritten further down. Because ADD checks whether it's
" bound. " bound.
CREATE OBJECT ro_html. CREATE OBJECT ri_html TYPE zcl_abapgit_html.
" You should remember that we render the message panel only " You should remember that we render the message panel only
" if we have an error. " if we have an error.
@ -191,7 +185,7 @@ CLASS ZCL_ABAPGIT_GUI_PAGE IMPLEMENTATION.
RETURN. RETURN.
ENDIF. ENDIF.
ro_html = zcl_abapgit_gui_chunk_lib=>render_error_message_box( mx_error ). ri_html = zcl_abapgit_gui_chunk_lib=>render_error_message_box( mx_error ).
" You should remember that the exception viewer dispatches the events of " You should remember that the exception viewer dispatches the events of
" error message panel " error message panel

View File

@ -14,25 +14,30 @@ CLASS zcl_abapgit_gui_page_debuginfo DEFINITION
render_content REDEFINITION. render_content REDEFINITION.
PRIVATE SECTION. PRIVATE SECTION.
METHODS get_jump_class METHODS get_jump_class
IMPORTING iv_class TYPE seoclsname IMPORTING
RETURNING VALUE(rv_html) TYPE string. !iv_class TYPE seoclsname
RETURNING
VALUE(rv_html) TYPE string .
METHODS render_debug_info METHODS render_debug_info
RETURNING VALUE(ro_html) TYPE REF TO zcl_abapgit_html RETURNING
RAISING zcx_abapgit_exception. VALUE(ri_html) TYPE REF TO zif_abapgit_html
RAISING
zcx_abapgit_exception .
METHODS render_supported_object_types METHODS render_supported_object_types
RETURNING VALUE(rv_html) TYPE string. RETURNING
VALUE(rv_html) TYPE string .
METHODS render_scripts METHODS render_scripts
RETURNING RETURNING
VALUE(ro_html) TYPE REF TO zcl_abapgit_html VALUE(ro_html) TYPE REF TO zcl_abapgit_html
RAISING RAISING
zcx_abapgit_exception. zcx_abapgit_exception .
ENDCLASS. ENDCLASS.
CLASS zcl_abapgit_gui_page_debuginfo IMPLEMENTATION. CLASS ZCL_ABAPGIT_GUI_PAGE_DEBUGINFO IMPLEMENTATION.
METHOD constructor. METHOD constructor.
@ -90,31 +95,31 @@ CLASS zcl_abapgit_gui_page_debuginfo IMPLEMENTATION.
READ TABLE lt_ver_tab INTO ls_version INDEX 3. " gui patch READ TABLE lt_ver_tab INTO ls_version INDEX 3. " gui patch
lv_gui_version = |{ lv_gui_version }.{ ls_version-filename }|. lv_gui_version = |{ lv_gui_version }.{ ls_version-filename }|.
CREATE OBJECT ro_html. CREATE OBJECT ri_html TYPE zcl_abapgit_html.
ro_html->add( |<table>| ). ri_html->add( |<table>| ).
ro_html->add( |<tr><td>abapGit version:</td><td>{ zif_abapgit_version=>gc_abap_version }</td></tr>| ). ri_html->add( |<tr><td>abapGit version:</td><td>{ zif_abapgit_version=>gc_abap_version }</td></tr>| ).
ro_html->add( |<tr><td>XML version: </td><td>{ zif_abapgit_version=>gc_xml_version }</td></tr>| ). ri_html->add( |<tr><td>XML version: </td><td>{ zif_abapgit_version=>gc_xml_version }</td></tr>| ).
ro_html->add( |<tr><td>GUI version: </td><td>{ lv_gui_version }</td></tr>| ). ri_html->add( |<tr><td>GUI version: </td><td>{ lv_gui_version }</td></tr>| ).
ro_html->add( |<tr><td>APACK version: </td><td>{ ri_html->add( |<tr><td>APACK version: </td><td>{
zcl_abapgit_apack_migration=>c_apack_interface_version }</td></tr>| ). zcl_abapgit_apack_migration=>c_apack_interface_version }</td></tr>| ).
ro_html->add( |<tr><td>LCL_TIME: </td><td>{ zcl_abapgit_time=>get_unix( ) }</td></tr>| ). ri_html->add( |<tr><td>LCL_TIME: </td><td>{ zcl_abapgit_time=>get_unix( ) }</td></tr>| ).
ro_html->add( |<tr><td>SY time: </td><td>{ sy-datum } { sy-uzeit } { sy-tzone }</td></tr>| ). ri_html->add( |<tr><td>SY time: </td><td>{ sy-datum } { sy-uzeit } { sy-tzone }</td></tr>| ).
ro_html->add( |</table>| ). ri_html->add( |</table>| ).
ro_html->add( |<br>| ). ri_html->add( |<br>| ).
lv_devclass = zcl_abapgit_services_abapgit=>is_installed( ). lv_devclass = zcl_abapgit_services_abapgit=>is_installed( ).
IF NOT lv_devclass IS INITIAL. IF NOT lv_devclass IS INITIAL.
ro_html->add( 'abapGit installed in package&nbsp;' ). ri_html->add( 'abapGit installed in package&nbsp;' ).
ro_html->add( lv_devclass ). ri_html->add( lv_devclass ).
ELSE. ELSE.
ro_html->add_a( iv_txt = 'install abapGit repo' ri_html->add_a( iv_txt = 'install abapGit repo'
iv_act = zif_abapgit_definitions=>c_action-abapgit_install ). iv_act = zif_abapgit_definitions=>c_action-abapgit_install ).
ro_html->add( ' - To keep abapGit up-to-date (or also to contribute) you need to' ). ri_html->add( ' - To keep abapGit up-to-date (or also to contribute) you need to' ).
ro_html->add( 'install it as a repository.' ). ri_html->add( 'install it as a repository.' ).
ENDIF. ENDIF.
ro_html->add( |<br>| ). ri_html->add( |<br>| ).
ENDMETHOD. ENDMETHOD.

View File

@ -78,7 +78,7 @@ CLASS zcl_abapgit_gui_page_merge_res DEFINITION
IMPORTING IMPORTING
!is_diff TYPE ty_file_diff !is_diff TYPE ty_file_diff
RETURNING RETURNING
VALUE(ro_html) TYPE REF TO zcl_abapgit_html VALUE(ri_html) TYPE REF TO zif_abapgit_html
RAISING RAISING
zcx_abapgit_exception . zcx_abapgit_exception .
METHODS render_diff_head METHODS render_diff_head
@ -98,7 +98,7 @@ CLASS zcl_abapgit_gui_page_merge_res DEFINITION
VALUE(ro_html) TYPE REF TO zcl_abapgit_html . VALUE(ro_html) TYPE REF TO zcl_abapgit_html .
METHODS render_table_head METHODS render_table_head
RETURNING RETURNING
VALUE(ro_html) TYPE REF TO zcl_abapgit_html . VALUE(ri_html) TYPE REF TO zif_abapgit_html .
METHODS resolve_diff METHODS resolve_diff
RAISING RAISING
zcx_abapgit_exception . zcx_abapgit_exception .
@ -263,46 +263,46 @@ CLASS ZCL_ABAPGIT_GUI_PAGE_MERGE_RES IMPLEMENTATION.
DATA: lv_target_content TYPE string. DATA: lv_target_content TYPE string.
FIELD-SYMBOLS: <ls_conflict> TYPE zif_abapgit_definitions=>ty_merge_conflict. FIELD-SYMBOLS: <ls_conflict> TYPE zif_abapgit_definitions=>ty_merge_conflict.
CREATE OBJECT ro_html. CREATE OBJECT ri_html TYPE zcl_abapgit_html.
ro_html->add( |<div class="diff" data-type="{ is_diff-type ri_html->add( |<div class="diff" data-type="{ is_diff-type
}" data-changed-by="{ is_diff-changed_by }" data-changed-by="{ is_diff-changed_by
}" data-file="{ is_diff-path && is_diff-filename }">| ). "#EC NOTEXT }" data-file="{ is_diff-path && is_diff-filename }">| ). "#EC NOTEXT
ro_html->add( render_diff_head( is_diff ) ). ri_html->add( render_diff_head( is_diff ) ).
" Content " Content
IF is_diff-type <> 'binary'. IF is_diff-type <> 'binary'.
IF mv_merge_mode = c_merge_mode-selection. IF mv_merge_mode = c_merge_mode-selection.
ro_html->add( '<div class="diff_content">' ). "#EC NOTEXT ri_html->add( '<div class="diff_content">' ). "#EC NOTEXT
ro_html->add( '<table class="diff_tab syntax-hl">' ). "#EC NOTEXT ri_html->add( '<table class="diff_tab syntax-hl">' ). "#EC NOTEXT
ro_html->add( render_table_head( ) ). ri_html->add( render_table_head( ) ).
ro_html->add( render_lines( is_diff ) ). ri_html->add( render_lines( is_diff ) ).
ro_html->add( '</table>' ). "#EC NOTEXT ri_html->add( '</table>' ). "#EC NOTEXT
ro_html->add( '</div>' ). "#EC NOTEXT ri_html->add( '</div>' ). "#EC NOTEXT
ELSE. ELSE.
"Table for Div-Table and textarea "Table for Div-Table and textarea
ro_html->add( '<div class="diff_content">' ). "#EC NOTEXT ri_html->add( '<div class="diff_content">' ). "#EC NOTEXT
ro_html->add( '<table class="w100">' ). "#EC NOTEXT ri_html->add( '<table class="w100">' ). "#EC NOTEXT
ro_html->add( '<thead class="header">' ). "#EC NOTEXT ri_html->add( '<thead class="header">' ). "#EC NOTEXT
ro_html->add( '<tr>' ). "#EC NOTEXT ri_html->add( '<tr>' ). "#EC NOTEXT
ro_html->add( '<th>Code</th>' ). "#EC NOTEXT ri_html->add( '<th>Code</th>' ). "#EC NOTEXT
ro_html->add( '<th>Merge - ' ). "#EC NOTEXT ri_html->add( '<th>Merge - ' ). "#EC NOTEXT
ro_html->add_a( iv_act = 'submitFormById(''merge_form'');' "#EC NOTEXT ri_html->add_a( iv_act = 'submitFormById(''merge_form'');' "#EC NOTEXT
iv_txt = 'Apply' iv_txt = 'Apply'
iv_typ = zif_abapgit_html=>c_action_type-onclick iv_typ = zif_abapgit_html=>c_action_type-onclick
iv_opt = zif_abapgit_html=>c_html_opt-strong ). iv_opt = zif_abapgit_html=>c_html_opt-strong ).
ro_html->add( '</th> ' ). "#EC NOTEXT ri_html->add( '</th> ' ). "#EC NOTEXT
ro_html->add( '</tr>' ). "#EC NOTEXT ri_html->add( '</tr>' ). "#EC NOTEXT
ro_html->add( '</thead>' ). "#EC NOTEXT ri_html->add( '</thead>' ). "#EC NOTEXT
ro_html->add( '<td>' ). ri_html->add( '<td>' ).
"Diff-Table of source and target file "Diff-Table of source and target file
ro_html->add( '<table class="diff_tab syntax-hl">' ). "#EC NOTEXT ri_html->add( '<table class="diff_tab syntax-hl">' ). "#EC NOTEXT
ro_html->add( render_table_head( ) ). ri_html->add( render_table_head( ) ).
ro_html->add( render_lines( is_diff ) ). ri_html->add( render_lines( is_diff ) ).
ro_html->add( '</table>' ). "#EC NOTEXT ri_html->add( '</table>' ). "#EC NOTEXT
READ TABLE mt_conflicts ASSIGNING <ls_conflict> INDEX mv_current_conflict_index. READ TABLE mt_conflicts ASSIGNING <ls_conflict> INDEX mv_current_conflict_index.
IF sy-subrc = 0. IF sy-subrc = 0.
@ -311,28 +311,28 @@ CLASS ZCL_ABAPGIT_GUI_PAGE_MERGE_RES IMPLEMENTATION.
format = cl_abap_format=>e_html_text ). format = cl_abap_format=>e_html_text ).
ENDIF. ENDIF.
ro_html->add( '</td>' ). "#EC NOTEXT ri_html->add( '</td>' ). "#EC NOTEXT
ro_html->add( '<td>' ). "#EC NOTEXT ri_html->add( '<td>' ). "#EC NOTEXT
ro_html->add( '<div class="form-container">' ). ri_html->add( '<div class="form-container">' ).
ro_html->add( |<form id="merge_form" class="aligned-form w100" accept-charset="UTF-8"| ). ri_html->add( |<form id="merge_form" class="aligned-form w100" accept-charset="UTF-8"| ).
ro_html->add( |method="post" action="sapevent:apply_merge">| ). ri_html->add( |method="post" action="sapevent:apply_merge">| ).
ro_html->add( |<textarea id="merge_content" name="merge_content" class="w100" | ). ri_html->add( |<textarea id="merge_content" name="merge_content" class="w100" | ).
ro_html->add( |rows="{ lines( is_diff-o_diff->get( ) ) }">{ lv_target_content }</textarea>| ). ri_html->add( |rows="{ lines( is_diff-o_diff->get( ) ) }">{ lv_target_content }</textarea>| ).
ro_html->add( '<input type="submit" class="hidden-submit">' ). ri_html->add( '<input type="submit" class="hidden-submit">' ).
ro_html->add( '</form>' ). "#EC NOTEXT ri_html->add( '</form>' ). "#EC NOTEXT
ro_html->add( '</div>' ). "#EC NOTEXT ri_html->add( '</div>' ). "#EC NOTEXT
ro_html->add( '</td>' ). "#EC NOTEXT ri_html->add( '</td>' ). "#EC NOTEXT
ro_html->add( '</table>' ). "#EC NOTEXT ri_html->add( '</table>' ). "#EC NOTEXT
ro_html->add( '</div>' ). "#EC NOTEXT ri_html->add( '</div>' ). "#EC NOTEXT
ENDIF. ENDIF.
ELSE. ELSE.
ro_html->add( '<div class="diff_content paddings center grey">' ). "#EC NOTEXT ri_html->add( '<div class="diff_content paddings center grey">' ). "#EC NOTEXT
ro_html->add( 'The content seems to be binary.' ). "#EC NOTEXT ri_html->add( 'The content seems to be binary.' ). "#EC NOTEXT
ro_html->add( 'Cannot display as diff.' ). "#EC NOTEXT ri_html->add( 'Cannot display as diff.' ). "#EC NOTEXT
ro_html->add( '</div>' ). "#EC NOTEXT ri_html->add( '</div>' ). "#EC NOTEXT
ENDIF. ENDIF.
ro_html->add( '</div>' ). "#EC NOTEXT ri_html->add( '</div>' ). "#EC NOTEXT
ENDMETHOD. ENDMETHOD.
@ -448,38 +448,38 @@ CLASS ZCL_ABAPGIT_GUI_PAGE_MERGE_RES IMPLEMENTATION.
METHOD render_table_head. METHOD render_table_head.
CREATE OBJECT ro_html. CREATE OBJECT ri_html TYPE zcl_abapgit_html.
ro_html->add( '<thead class="header">' ). "#EC NOTEXT ri_html->add( '<thead class="header">' ). "#EC NOTEXT
ro_html->add( '<tr>' ). "#EC NOTEXT ri_html->add( '<tr>' ). "#EC NOTEXT
ro_html->add( '<th class="num"></th>' ). "#EC NOTEXT ri_html->add( '<th class="num"></th>' ). "#EC NOTEXT
IF mv_merge_mode = c_merge_mode-selection. IF mv_merge_mode = c_merge_mode-selection.
ro_html->add( '<form id="target_form" method="post" action="sapevent:apply_target">' ). "#EC NOTEXT ri_html->add( '<form id="target_form" method="post" action="sapevent:apply_target">' ). "#EC NOTEXT
ro_html->add( '<th>Target - ' && mo_repo->get_branch_name( ) && ' - ' ). "#EC NOTEXT ri_html->add( '<th>Target - ' && mo_repo->get_branch_name( ) && ' - ' ). "#EC NOTEXT
ro_html->add_a( iv_act = 'submitFormById(''target_form'');' "#EC NOTEXT ri_html->add_a( iv_act = 'submitFormById(''target_form'');' "#EC NOTEXT
iv_txt = 'Apply' iv_txt = 'Apply'
iv_typ = zif_abapgit_html=>c_action_type-onclick iv_typ = zif_abapgit_html=>c_action_type-onclick
iv_opt = zif_abapgit_html=>c_html_opt-strong ). iv_opt = zif_abapgit_html=>c_html_opt-strong ).
ro_html->add( '</th> ' ). "#EC NOTEXT ri_html->add( '</th> ' ). "#EC NOTEXT
ro_html->add( '</form>' ). "#EC NOTEXT ri_html->add( '</form>' ). "#EC NOTEXT
ro_html->add( '<th class="num"></th>' ). "#EC NOTEXT ri_html->add( '<th class="num"></th>' ). "#EC NOTEXT
ro_html->add( '<form id="source_form" method="post" action="sapevent:apply_source">' ). "#EC NOTEXT ri_html->add( '<form id="source_form" method="post" action="sapevent:apply_source">' ). "#EC NOTEXT
ro_html->add( '<th>Source - ' && mo_merge->get_source_branch( ) && ' - ' ). "#EC NOTEXT ri_html->add( '<th>Source - ' && mo_merge->get_source_branch( ) && ' - ' ). "#EC NOTEXT
ro_html->add_a( iv_act = 'submitFormById(''source_form'');' "#EC NOTEXT ri_html->add_a( iv_act = 'submitFormById(''source_form'');' "#EC NOTEXT
iv_txt = 'Apply' iv_txt = 'Apply'
iv_typ = zif_abapgit_html=>c_action_type-onclick iv_typ = zif_abapgit_html=>c_action_type-onclick
iv_opt = zif_abapgit_html=>c_html_opt-strong ). iv_opt = zif_abapgit_html=>c_html_opt-strong ).
ro_html->add( '</th> ' ). "#EC NOTEXT ri_html->add( '</th> ' ). "#EC NOTEXT
ro_html->add( '</form>' ). "#EC NOTEXT ri_html->add( '</form>' ). "#EC NOTEXT
ELSE. ELSE.
ro_html->add( '<th>Target - ' && mo_repo->get_branch_name( ) && '</th> ' ). "#EC NOTEXT ri_html->add( '<th>Target - ' && mo_repo->get_branch_name( ) && '</th> ' ). "#EC NOTEXT
ro_html->add( '<th class="num"></th>' ). "#EC NOTEXT ri_html->add( '<th class="num"></th>' ). "#EC NOTEXT
ro_html->add( '<th>Source - ' && mo_merge->get_source_branch( ) && '</th> ' ). "#EC NOTEXT ri_html->add( '<th>Source - ' && mo_merge->get_source_branch( ) && '</th> ' ). "#EC NOTEXT
ENDIF. ENDIF.
ro_html->add( '</tr>' ). "#EC NOTEXT ri_html->add( '</tr>' ). "#EC NOTEXT
ro_html->add( '</thead>' ). "#EC NOTEXT ri_html->add( '</thead>' ). "#EC NOTEXT
ENDMETHOD. ENDMETHOD.

View File

@ -71,7 +71,7 @@ CLASS zcl_abapgit_gui_page_stage DEFINITION
VALUE(ri_html) TYPE REF TO zif_abapgit_html . VALUE(ri_html) TYPE REF TO zif_abapgit_html .
METHODS render_actions METHODS render_actions
RETURNING RETURNING
VALUE(ro_html) TYPE REF TO zcl_abapgit_html . VALUE(ri_html) TYPE REF TO zif_abapgit_html .
METHODS stage_selected METHODS stage_selected
IMPORTING IMPORTING
!it_postdata TYPE cnht_post_data_tab !it_postdata TYPE cnht_post_data_tab
@ -102,7 +102,7 @@ CLASS zcl_abapgit_gui_page_stage DEFINITION
VALUE(rv_count) TYPE i . VALUE(rv_count) TYPE i .
METHODS render_deferred_hidden_events METHODS render_deferred_hidden_events
RETURNING RETURNING
VALUE(ro_html) TYPE REF TO zcl_abapgit_html . VALUE(ri_html) TYPE REF TO zif_abapgit_html .
METHODS render_scripts METHODS render_scripts
RETURNING RETURNING
VALUE(ro_html) TYPE REF TO zcl_abapgit_html VALUE(ro_html) TYPE REF TO zcl_abapgit_html
@ -269,44 +269,44 @@ CLASS ZCL_ABAPGIT_GUI_PAGE_STAGE IMPLEMENTATION.
DATA: lv_local_count TYPE i, DATA: lv_local_count TYPE i,
lv_add_all_txt TYPE string. lv_add_all_txt TYPE string.
CREATE OBJECT ro_html. CREATE OBJECT ri_html TYPE zcl_abapgit_html.
lv_local_count = count_default_files_to_commit( ). lv_local_count = count_default_files_to_commit( ).
IF lv_local_count > 0. IF lv_local_count > 0.
lv_add_all_txt = |Add All and Commit ({ lv_local_count })|. lv_add_all_txt = |Add All and Commit ({ lv_local_count })|.
" Otherwise empty, but the element (id) is preserved for JS " Otherwise empty, but the element (id) is preserved for JS
ENDIF. ENDIF.
ro_html->add( '<table class="w100 margin-v5"><tr>' ). ri_html->add( '<table class="w100 margin-v5"><tr>' ).
" Action buttons " Action buttons
ro_html->add( '<td class="indent5em">' ). ri_html->add( '<td class="indent5em">' ).
ro_html->add_a( iv_act = 'errorStub(event)' " Will be reinit by JS ri_html->add_a( iv_act = 'errorStub(event)' " Will be reinit by JS
iv_typ = zif_abapgit_html=>c_action_type-onclick iv_typ = zif_abapgit_html=>c_action_type-onclick
iv_id = 'commitSelectedButton' iv_id = 'commitSelectedButton'
iv_style = 'display: none' iv_style = 'display: none'
iv_txt = 'Commit Selected (<span class="counter"></span>)' iv_txt = 'Commit Selected (<span class="counter"></span>)'
iv_opt = zif_abapgit_html=>c_html_opt-strong ) ##NO_TEXT. iv_opt = zif_abapgit_html=>c_html_opt-strong ) ##NO_TEXT.
ro_html->add_a( iv_act = 'errorStub(event)' " Will be reinit by JS ri_html->add_a( iv_act = 'errorStub(event)' " Will be reinit by JS
iv_typ = zif_abapgit_html=>c_action_type-onclick iv_typ = zif_abapgit_html=>c_action_type-onclick
iv_id = 'commitFilteredButton' iv_id = 'commitFilteredButton'
iv_style = 'display: none' iv_style = 'display: none'
iv_txt = 'Add <b>Filtered</b> and Commit (<span class="counter"></span>)' ) ##NO_TEXT. iv_txt = 'Add <b>Filtered</b> and Commit (<span class="counter"></span>)' ) ##NO_TEXT.
ro_html->add_a( iv_act = |{ c_action-stage_all }| ri_html->add_a( iv_act = |{ c_action-stage_all }|
iv_id = 'commitAllButton' iv_id = 'commitAllButton'
iv_txt = lv_add_all_txt ) ##NO_TEXT. iv_txt = lv_add_all_txt ) ##NO_TEXT.
ro_html->add( '</td>' ). ri_html->add( '</td>' ).
" Filter bar " Filter bar
ro_html->add( '<td class="right">' ). ri_html->add( '<td class="right">' ).
ro_html->add( '<input class="stage-filter" id="objectSearch"' && ri_html->add( '<input class="stage-filter" id="objectSearch"' &&
' type="search" placeholder="Filter Objects"' && ' type="search" placeholder="Filter Objects"' &&
| value={ mv_filter_value }>| ). | value={ mv_filter_value }>| ).
ro_html->add( '</td>' ). ri_html->add( '</td>' ).
ro_html->add( '</tr>' ). ri_html->add( '</tr>' ).
ro_html->add( '</table>' ). ri_html->add( '</table>' ).
ENDMETHOD. ENDMETHOD.
@ -342,8 +342,8 @@ CLASS ZCL_ABAPGIT_GUI_PAGE_STAGE IMPLEMENTATION.
ls_event-method = 'post'. ls_event-method = 'post'.
ls_event-name = 'stage_commit'. ls_event-name = 'stage_commit'.
ro_html = zcl_abapgit_gui_chunk_lib=>render_event_as_form( ls_event ). ri_html = zcl_abapgit_gui_chunk_lib=>render_event_as_form( ls_event ).
ro_html->zif_abapgit_html~set_title( cl_abap_typedescr=>describe_by_object_ref( me )->get_relative_name( ) ). ri_html->set_title( cl_abap_typedescr=>describe_by_object_ref( me )->get_relative_name( ) ).
ENDMETHOD. ENDMETHOD.