diff --git a/src/ui/core/zcl_abapgit_html.clas.abap b/src/ui/core/zcl_abapgit_html.clas.abap index 25ec86207..f6f200b36 100644 --- a/src/ui/core/zcl_abapgit_html.clas.abap +++ b/src/ui/core/zcl_abapgit_html.clas.abap @@ -63,6 +63,7 @@ CLASS zcl_abapgit_html DEFINITION METHODS checkbox IMPORTING iv_id TYPE string + iv_checked TYPE abap_bool OPTIONAL RETURNING VALUE(rv_html) TYPE string. @@ -84,7 +85,13 @@ CLASS ZCL_ABAPGIT_HTML IMPLEMENTATION. METHOD checkbox. - rv_html = ||. + DATA: lv_checked TYPE string. + + IF iv_checked = abap_true. + lv_checked = |checked|. + ENDIF. + + rv_html = ||. ENDMETHOD. @@ -308,7 +315,8 @@ CLASS ZCL_ABAPGIT_HTML IMPLEMENTATION. METHOD zif_abapgit_html~add_checkbox. - add( checkbox( iv_id ) ). + add( checkbox( iv_id = iv_id + iv_checked = iv_checked ) ). ENDMETHOD. diff --git a/src/ui/core/zif_abapgit_html.intf.abap b/src/ui/core/zif_abapgit_html.intf.abap index 6136e1a42..369322084 100644 --- a/src/ui/core/zif_abapgit_html.intf.abap +++ b/src/ui/core/zif_abapgit_html.intf.abap @@ -38,7 +38,8 @@ INTERFACE zif_abapgit_html PUBLIC. !iv_title TYPE string OPTIONAL. METHODS add_checkbox IMPORTING - iv_id TYPE string. + iv_id TYPE string + iv_checked TYPE abap_bool OPTIONAL. CLASS-METHODS a IMPORTING !iv_txt TYPE string diff --git a/src/ui/zcl_abapgit_gui_page_diff.clas.abap b/src/ui/zcl_abapgit_gui_page_diff.clas.abap index 13f0bdb23..fb6125822 100644 --- a/src/ui/zcl_abapgit_gui_page_diff.clas.abap +++ b/src/ui/zcl_abapgit_gui_page_diff.clas.abap @@ -113,7 +113,9 @@ CLASS zcl_abapgit_gui_page_diff DEFINITION iv_patch_line_possible TYPE abap_bool iv_filename TYPE string is_diff_line TYPE zif_abapgit_definitions=>ty_diff - iv_index TYPE sy-tabix. + iv_index TYPE sy-tabix + RAISING + zcx_abapgit_exception. METHODS start_staging IMPORTING it_postdata TYPE cnht_post_data_tab @@ -981,17 +983,19 @@ CLASS zcl_abapgit_gui_page_diff IMPLEMENTATION. patch TYPE string VALUE `patch` ##NO_TEXT, END OF c_css_class. - DATA: lv_id TYPE string, - lv_object TYPE string. + DATA: lv_id TYPE string, + lv_patched TYPE abap_bool. - lv_object = iv_filename. + lv_patched = get_diff_object( iv_filename )->is_line_patched( iv_index ). IF iv_patch_line_possible = abap_true. - lv_id = |{ lv_object }_{ mv_section_count }_{ iv_index }|. + lv_id = |{ iv_filename }_{ mv_section_count }_{ iv_index }|. io_html->add( |