mirror of
https://github.com/abapGit/abapGit.git
synced 2025-05-01 12:20:51 +08:00
HTML refactoring (#3813)
* HTML refactoring * removes the ADD_ICON alias #3460 * remove IS_EMPTY alias * more * refactoring
This commit is contained in:
parent
c9dbee83b4
commit
86657cc691
|
@ -10,12 +10,8 @@ CLASS zcl_abapgit_html DEFINITION
|
||||||
FOR zif_abapgit_html~add .
|
FOR zif_abapgit_html~add .
|
||||||
ALIASES add_checkbox
|
ALIASES add_checkbox
|
||||||
FOR zif_abapgit_html~add_checkbox .
|
FOR zif_abapgit_html~add_checkbox .
|
||||||
ALIASES add_icon
|
|
||||||
FOR zif_abapgit_html~add_icon .
|
|
||||||
ALIASES icon
|
ALIASES icon
|
||||||
FOR zif_abapgit_html~icon .
|
FOR zif_abapgit_html~icon .
|
||||||
ALIASES is_empty
|
|
||||||
FOR zif_abapgit_html~is_empty .
|
|
||||||
|
|
||||||
CONSTANTS c_indent_size TYPE i VALUE 2 ##NO_TEXT.
|
CONSTANTS c_indent_size TYPE i VALUE 2 ##NO_TEXT.
|
||||||
|
|
||||||
|
@ -121,43 +117,6 @@ CLASS ZCL_ABAPGIT_HTML IMPLEMENTATION.
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
METHOD icon.
|
|
||||||
|
|
||||||
DATA: lv_hint TYPE string,
|
|
||||||
lv_name TYPE string,
|
|
||||||
lv_color TYPE string,
|
|
||||||
lv_class TYPE string,
|
|
||||||
lv_large_icon TYPE string,
|
|
||||||
lv_xpixel TYPE i,
|
|
||||||
lv_onclick TYPE string.
|
|
||||||
|
|
||||||
SPLIT iv_name AT '/' INTO lv_name lv_color.
|
|
||||||
|
|
||||||
IF iv_hint IS NOT INITIAL.
|
|
||||||
lv_hint = | title="{ iv_hint }"|.
|
|
||||||
ENDIF.
|
|
||||||
IF iv_onclick IS NOT INITIAL.
|
|
||||||
lv_onclick = | onclick="{ iv_onclick }"|.
|
|
||||||
ENDIF.
|
|
||||||
IF iv_class IS NOT INITIAL.
|
|
||||||
lv_class = | { iv_class }|.
|
|
||||||
ENDIF.
|
|
||||||
IF lv_color IS NOT INITIAL.
|
|
||||||
lv_color = | { lv_color }|.
|
|
||||||
ENDIF.
|
|
||||||
|
|
||||||
lv_xpixel = cl_gui_cfw=>compute_pixel_from_metric( x_or_y = 'X'
|
|
||||||
in = 1 ).
|
|
||||||
IF lv_xpixel >= 2.
|
|
||||||
lv_large_icon = ' large'.
|
|
||||||
ENDIF.
|
|
||||||
|
|
||||||
rv_str = |<i class="icon{ lv_large_icon } icon-{ lv_name }{ lv_color }|.
|
|
||||||
rv_str = |{ rv_str }{ lv_class }"{ lv_onclick }{ lv_hint }></i>|.
|
|
||||||
|
|
||||||
ENDMETHOD.
|
|
||||||
|
|
||||||
|
|
||||||
METHOD indent_line.
|
METHOD indent_line.
|
||||||
|
|
||||||
DATA: ls_study TYPE ty_study_result,
|
DATA: ls_study TYPE ty_study_result,
|
||||||
|
@ -208,11 +167,6 @@ CLASS ZCL_ABAPGIT_HTML IMPLEMENTATION.
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
METHOD is_empty.
|
|
||||||
rv_yes = boolc( lines( mt_buffer ) = 0 ).
|
|
||||||
ENDMETHOD.
|
|
||||||
|
|
||||||
|
|
||||||
METHOD study_line.
|
METHOD study_line.
|
||||||
|
|
||||||
DATA: lv_line TYPE string,
|
DATA: lv_line TYPE string,
|
||||||
|
@ -365,6 +319,48 @@ CLASS ZCL_ABAPGIT_HTML IMPLEMENTATION.
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
|
METHOD zif_abapgit_html~icon.
|
||||||
|
|
||||||
|
DATA: lv_hint TYPE string,
|
||||||
|
lv_name TYPE string,
|
||||||
|
lv_color TYPE string,
|
||||||
|
lv_class TYPE string,
|
||||||
|
lv_large_icon TYPE string,
|
||||||
|
lv_xpixel TYPE i,
|
||||||
|
lv_onclick TYPE string.
|
||||||
|
|
||||||
|
SPLIT iv_name AT '/' INTO lv_name lv_color.
|
||||||
|
|
||||||
|
IF iv_hint IS NOT INITIAL.
|
||||||
|
lv_hint = | title="{ iv_hint }"|.
|
||||||
|
ENDIF.
|
||||||
|
IF iv_onclick IS NOT INITIAL.
|
||||||
|
lv_onclick = | onclick="{ iv_onclick }"|.
|
||||||
|
ENDIF.
|
||||||
|
IF iv_class IS NOT INITIAL.
|
||||||
|
lv_class = | { iv_class }|.
|
||||||
|
ENDIF.
|
||||||
|
IF lv_color IS NOT INITIAL.
|
||||||
|
lv_color = | { lv_color }|.
|
||||||
|
ENDIF.
|
||||||
|
|
||||||
|
lv_xpixel = cl_gui_cfw=>compute_pixel_from_metric( x_or_y = 'X'
|
||||||
|
in = 1 ).
|
||||||
|
IF lv_xpixel >= 2.
|
||||||
|
lv_large_icon = ' large'.
|
||||||
|
ENDIF.
|
||||||
|
|
||||||
|
rv_str = |<i class="icon{ lv_large_icon } icon-{ lv_name }{ lv_color }|.
|
||||||
|
rv_str = |{ rv_str }{ lv_class }"{ lv_onclick }{ lv_hint }></i>|.
|
||||||
|
|
||||||
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
|
METHOD zif_abapgit_html~is_empty.
|
||||||
|
rv_yes = boolc( lines( mt_buffer ) = 0 ).
|
||||||
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
METHOD zif_abapgit_html~render.
|
METHOD zif_abapgit_html~render.
|
||||||
|
|
||||||
DATA: ls_context TYPE ty_indent_context,
|
DATA: ls_context TYPE ty_indent_context,
|
||||||
|
|
|
@ -83,7 +83,7 @@ CLASS zcl_abapgit_gui_chunk_lib DEFINITION
|
||||||
IMPORTING
|
IMPORTING
|
||||||
!iv_text TYPE string
|
!iv_text TYPE string
|
||||||
RETURNING
|
RETURNING
|
||||||
VALUE(ro_html) TYPE REF TO zcl_abapgit_html .
|
VALUE(ri_html) TYPE REF TO zif_abapgit_html .
|
||||||
CLASS-METHODS render_infopanel
|
CLASS-METHODS render_infopanel
|
||||||
IMPORTING
|
IMPORTING
|
||||||
!iv_div_id TYPE string
|
!iv_div_id TYPE string
|
||||||
|
@ -813,10 +813,10 @@ CLASS ZCL_ABAPGIT_GUI_CHUNK_LIB IMPLEMENTATION.
|
||||||
|
|
||||||
METHOD render_warning_banner.
|
METHOD render_warning_banner.
|
||||||
|
|
||||||
CREATE OBJECT ro_html.
|
CREATE OBJECT ri_html TYPE zcl_abapgit_html.
|
||||||
ro_html->add( '<div class="dummydiv warning">' ).
|
ri_html->add( '<div class="dummydiv warning">' ).
|
||||||
ro_html->add( |{ zcl_abapgit_html=>icon( 'exclamation-triangle/yellow' ) }| && | { iv_text }| ).
|
ri_html->add( |{ ri_html->icon( 'exclamation-triangle/yellow' ) }| && | { iv_text }| ).
|
||||||
ro_html->add( '</div>' ).
|
ri_html->add( '</div>' ).
|
||||||
|
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
ENDCLASS.
|
ENDCLASS.
|
||||||
|
|
|
@ -190,7 +190,7 @@ CLASS ZCL_ABAPGIT_GUI_PAGE_CODE_INSP IMPLEMENTATION.
|
||||||
|
|
||||||
IF lines( mt_result ) = 0.
|
IF lines( mt_result ) = 0.
|
||||||
ri_html->add( '<div class="dummydiv success">' ).
|
ri_html->add( '<div class="dummydiv success">' ).
|
||||||
ri_html->add( zcl_abapgit_html=>icon( 'check' ) ).
|
ri_html->add( ri_html->icon( 'check' ) ).
|
||||||
ri_html->add( 'No code inspector findings' ).
|
ri_html->add( 'No code inspector findings' ).
|
||||||
ri_html->add( '</div>' ).
|
ri_html->add( '</div>' ).
|
||||||
ELSE.
|
ELSE.
|
||||||
|
|
|
@ -185,7 +185,7 @@ CLASS ZCL_ABAPGIT_GUI_PAGE_CODI_BASE IMPLEMENTATION.
|
||||||
|
|
||||||
IF lines( it_result ) > lc_limit.
|
IF lines( it_result ) > lc_limit.
|
||||||
ii_html->add( '<div class="dummydiv warning">' ).
|
ii_html->add( '<div class="dummydiv warning">' ).
|
||||||
ii_html->add( zcl_abapgit_html=>icon( 'exclamation-triangle' ) ).
|
ii_html->add( ii_html->icon( 'exclamation-triangle' ) ).
|
||||||
ii_html->add( |Only first { lc_limit } findings shown in list!| ).
|
ii_html->add( |Only first { lc_limit } findings shown in list!| ).
|
||||||
ii_html->add( '</div>' ).
|
ii_html->add( '</div>' ).
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
|
@ -81,7 +81,7 @@ CLASS zcl_abapgit_gui_page_diff DEFINITION
|
||||||
!is_diff TYPE ty_file_diff .
|
!is_diff TYPE ty_file_diff .
|
||||||
METHODS render_beacon_begin_of_row
|
METHODS render_beacon_begin_of_row
|
||||||
IMPORTING
|
IMPORTING
|
||||||
!io_html TYPE REF TO zcl_abapgit_html
|
!ii_html TYPE REF TO zif_abapgit_html
|
||||||
!is_diff TYPE ty_file_diff .
|
!is_diff TYPE ty_file_diff .
|
||||||
METHODS render_diff_head_after_state
|
METHODS render_diff_head_after_state
|
||||||
IMPORTING
|
IMPORTING
|
||||||
|
@ -92,7 +92,7 @@ CLASS zcl_abapgit_gui_page_diff DEFINITION
|
||||||
VALUE(rv_insert_nav) TYPE abap_bool .
|
VALUE(rv_insert_nav) TYPE abap_bool .
|
||||||
METHODS render_line_split_row
|
METHODS render_line_split_row
|
||||||
IMPORTING
|
IMPORTING
|
||||||
!io_html TYPE REF TO zcl_abapgit_html
|
!ii_html TYPE REF TO zif_abapgit_html
|
||||||
!iv_filename TYPE string
|
!iv_filename TYPE string
|
||||||
!is_diff_line TYPE zif_abapgit_definitions=>ty_diff
|
!is_diff_line TYPE zif_abapgit_definitions=>ty_diff
|
||||||
!iv_index TYPE sy-tabix
|
!iv_index TYPE sy-tabix
|
||||||
|
@ -115,7 +115,7 @@ CLASS zcl_abapgit_gui_page_diff DEFINITION
|
||||||
END OF c_actions .
|
END OF c_actions .
|
||||||
DATA mt_delayed_lines TYPE zif_abapgit_definitions=>ty_diffs_tt .
|
DATA mt_delayed_lines TYPE zif_abapgit_definitions=>ty_diffs_tt .
|
||||||
DATA mv_repo_key TYPE zif_abapgit_persistence=>ty_repo-key .
|
DATA mv_repo_key TYPE zif_abapgit_persistence=>ty_repo-key .
|
||||||
DATA mv_seed TYPE string . " Unique page id to bind JS sessionStorage
|
DATA mv_seed TYPE string . " Unique page id to bind JS sessionStorage
|
||||||
|
|
||||||
METHODS render_diff
|
METHODS render_diff
|
||||||
IMPORTING
|
IMPORTING
|
||||||
|
@ -141,7 +141,7 @@ CLASS zcl_abapgit_gui_page_diff DEFINITION
|
||||||
!is_diff_line TYPE zif_abapgit_definitions=>ty_diff
|
!is_diff_line TYPE zif_abapgit_definitions=>ty_diff
|
||||||
!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 .
|
||||||
METHODS render_line_split
|
METHODS render_line_split
|
||||||
IMPORTING
|
IMPORTING
|
||||||
!is_diff_line TYPE zif_abapgit_definitions=>ty_diff
|
!is_diff_line TYPE zif_abapgit_definitions=>ty_diff
|
||||||
|
@ -149,7 +149,7 @@ CLASS zcl_abapgit_gui_page_diff DEFINITION
|
||||||
!iv_fstate TYPE char1
|
!iv_fstate TYPE char1
|
||||||
!iv_index TYPE sy-tabix
|
!iv_index TYPE sy-tabix
|
||||||
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_line_unified
|
METHODS render_line_unified
|
||||||
|
@ -562,7 +562,7 @@ CLASS ZCL_ABAPGIT_GUI_PAGE_DIFF IMPLEMENTATION.
|
||||||
DATA: lv_beacon TYPE string,
|
DATA: lv_beacon TYPE string,
|
||||||
lt_beacons TYPE zif_abapgit_definitions=>ty_string_tt.
|
lt_beacons TYPE zif_abapgit_definitions=>ty_string_tt.
|
||||||
|
|
||||||
CREATE OBJECT ro_html.
|
CREATE OBJECT ri_html TYPE zcl_abapgit_html.
|
||||||
|
|
||||||
IF is_diff_line-beacon > 0.
|
IF is_diff_line-beacon > 0.
|
||||||
lt_beacons = is_diff-o_diff->get_beacons( ).
|
lt_beacons = is_diff-o_diff->get_beacons( ).
|
||||||
|
@ -571,30 +571,30 @@ CLASS ZCL_ABAPGIT_GUI_PAGE_DIFF IMPLEMENTATION.
|
||||||
lv_beacon = '---'.
|
lv_beacon = '---'.
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
ro_html->add( '<thead class="nav_line">' ).
|
ri_html->add( '<thead class="nav_line">' ).
|
||||||
ro_html->add( '<tr>' ).
|
ri_html->add( '<tr>' ).
|
||||||
|
|
||||||
render_beacon_begin_of_row(
|
render_beacon_begin_of_row(
|
||||||
io_html = ro_html
|
ii_html = ri_html
|
||||||
is_diff = is_diff ).
|
is_diff = is_diff ).
|
||||||
|
|
||||||
IF mv_unified = abap_true.
|
IF mv_unified = abap_true.
|
||||||
ro_html->add( '<th class="num"></th>' ).
|
ri_html->add( '<th class="num"></th>' ).
|
||||||
ro_html->add( '<th class="mark"></th>' ).
|
ri_html->add( '<th class="mark"></th>' ).
|
||||||
ro_html->add( |<th>@@ { is_diff_line-new_num } @@ { lv_beacon }</th>| ).
|
ri_html->add( |<th>@@ { is_diff_line-new_num } @@ { lv_beacon }</th>| ).
|
||||||
ELSE.
|
ELSE.
|
||||||
ro_html->add( |<th colspan="6">@@ { is_diff_line-new_num } @@ { lv_beacon }</th>| ).
|
ri_html->add( |<th colspan="6">@@ { is_diff_line-new_num } @@ { lv_beacon }</th>| ).
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
ro_html->add( '</tr>' ).
|
ri_html->add( '</tr>' ).
|
||||||
ro_html->add( '</thead>' ).
|
ri_html->add( '</thead>' ).
|
||||||
|
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
METHOD render_beacon_begin_of_row.
|
METHOD render_beacon_begin_of_row.
|
||||||
|
|
||||||
io_html->add( '<th class="num"></th>' ).
|
ii_html->add( '<th class="num"></th>' ).
|
||||||
|
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
@ -796,7 +796,7 @@ CLASS ZCL_ABAPGIT_GUI_PAGE_DIFF IMPLEMENTATION.
|
||||||
lv_mark TYPE string,
|
lv_mark TYPE string,
|
||||||
lv_bg TYPE string.
|
lv_bg TYPE string.
|
||||||
|
|
||||||
CREATE OBJECT ro_html.
|
CREATE OBJECT ri_html TYPE zcl_abapgit_html.
|
||||||
|
|
||||||
" New line
|
" New line
|
||||||
lv_mark = ` `.
|
lv_mark = ` `.
|
||||||
|
@ -830,10 +830,10 @@ CLASS ZCL_ABAPGIT_GUI_PAGE_DIFF IMPLEMENTATION.
|
||||||
&& |<td class="code{ lv_bg } diff_right">{ is_diff_line-old }</td>|.
|
&& |<td class="code{ lv_bg } diff_right">{ is_diff_line-old }</td>|.
|
||||||
|
|
||||||
" render line, inverse sides if remote is newer
|
" render line, inverse sides if remote is newer
|
||||||
ro_html->add( '<tr>' ). "#EC NOTEXT
|
ri_html->add( '<tr>' ). "#EC NOTEXT
|
||||||
|
|
||||||
render_line_split_row(
|
render_line_split_row(
|
||||||
io_html = ro_html
|
ii_html = ri_html
|
||||||
iv_filename = iv_filename
|
iv_filename = iv_filename
|
||||||
is_diff_line = is_diff_line
|
is_diff_line = is_diff_line
|
||||||
iv_index = iv_index
|
iv_index = iv_index
|
||||||
|
@ -841,7 +841,7 @@ CLASS ZCL_ABAPGIT_GUI_PAGE_DIFF IMPLEMENTATION.
|
||||||
iv_old = lv_old
|
iv_old = lv_old
|
||||||
iv_new = lv_new ).
|
iv_new = lv_new ).
|
||||||
|
|
||||||
ro_html->add( '</tr>' ). "#EC NOTEXT
|
ri_html->add( '</tr>' ). "#EC NOTEXT
|
||||||
|
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
@ -849,11 +849,11 @@ CLASS ZCL_ABAPGIT_GUI_PAGE_DIFF IMPLEMENTATION.
|
||||||
METHOD render_line_split_row.
|
METHOD render_line_split_row.
|
||||||
|
|
||||||
IF iv_fstate = c_fstate-remote. " Remote file leading changes
|
IF iv_fstate = c_fstate-remote. " Remote file leading changes
|
||||||
io_html->add( iv_old ). " local
|
ii_html->add( iv_old ). " local
|
||||||
io_html->add( iv_new ). " remote
|
ii_html->add( iv_new ). " remote
|
||||||
ELSE. " Local leading changes or both were modified
|
ELSE. " Local leading changes or both were modified
|
||||||
io_html->add( iv_new ). " local
|
ii_html->add( iv_new ). " local
|
||||||
io_html->add( iv_old ). " remote
|
ii_html->add( iv_old ). " remote
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
|
@ -42,8 +42,8 @@ CLASS zcl_abapgit_gui_page_patch DEFINITION
|
||||||
|
|
||||||
|
|
||||||
PRIVATE SECTION.
|
PRIVATE SECTION.
|
||||||
TYPES:
|
|
||||||
ty_patch_action TYPE string .
|
TYPES ty_patch_action TYPE string .
|
||||||
|
|
||||||
CONSTANTS:
|
CONSTANTS:
|
||||||
BEGIN OF c_actions,
|
BEGIN OF c_actions,
|
||||||
|
@ -51,130 +51,109 @@ CLASS zcl_abapgit_gui_page_patch DEFINITION
|
||||||
refresh TYPE string VALUE 'patch_refresh',
|
refresh TYPE string VALUE 'patch_refresh',
|
||||||
refresh_local TYPE string VALUE 'patch_refresh_local',
|
refresh_local TYPE string VALUE 'patch_refresh_local',
|
||||||
refresh_local_object TYPE string VALUE 'patch_refresh_local_object',
|
refresh_local_object TYPE string VALUE 'patch_refresh_local_object',
|
||||||
END OF c_actions,
|
END OF c_actions .
|
||||||
|
CONSTANTS:
|
||||||
BEGIN OF c_patch_action,
|
BEGIN OF c_patch_action,
|
||||||
add TYPE ty_patch_action VALUE 'add',
|
add TYPE ty_patch_action VALUE 'add',
|
||||||
remove TYPE ty_patch_action VALUE 'remove',
|
remove TYPE ty_patch_action VALUE 'remove',
|
||||||
END OF c_patch_action .
|
END OF c_patch_action .
|
||||||
|
DATA mo_stage TYPE REF TO zcl_abapgit_stage .
|
||||||
|
DATA mv_section_count TYPE i .
|
||||||
|
DATA mv_pushed TYPE abap_bool .
|
||||||
|
DATA mo_repo_online TYPE REF TO zcl_abapgit_repo_online .
|
||||||
|
|
||||||
DATA:
|
METHODS render_patch
|
||||||
mo_stage TYPE REF TO zcl_abapgit_stage,
|
IMPORTING
|
||||||
mv_section_count TYPE i,
|
!ii_html TYPE REF TO zif_abapgit_html
|
||||||
mv_pushed TYPE abap_bool,
|
!iv_filename TYPE string
|
||||||
mo_repo_online TYPE REF TO zcl_abapgit_repo_online.
|
!is_diff_line TYPE zif_abapgit_definitions=>ty_diff
|
||||||
|
!iv_index TYPE sy-tabix
|
||||||
METHODS:
|
RAISING
|
||||||
render_patch
|
zcx_abapgit_exception .
|
||||||
IMPORTING
|
METHODS render_patch_head
|
||||||
io_html TYPE REF TO zcl_abapgit_html
|
IMPORTING
|
||||||
iv_filename TYPE string
|
!io_html TYPE REF TO zcl_abapgit_html
|
||||||
is_diff_line TYPE zif_abapgit_definitions=>ty_diff
|
!is_diff TYPE ty_file_diff .
|
||||||
iv_index TYPE sy-tabix
|
METHODS start_staging
|
||||||
RAISING
|
IMPORTING
|
||||||
zcx_abapgit_exception,
|
!it_postdata TYPE cnht_post_data_tab
|
||||||
|
RAISING
|
||||||
render_patch_head
|
zcx_abapgit_exception .
|
||||||
IMPORTING
|
METHODS apply_patch_from_form_fields
|
||||||
io_html TYPE REF TO zcl_abapgit_html
|
IMPORTING
|
||||||
is_diff TYPE ty_file_diff,
|
!it_postdata TYPE cnht_post_data_tab
|
||||||
|
RAISING
|
||||||
start_staging
|
zcx_abapgit_exception .
|
||||||
IMPORTING
|
METHODS restore_patch_flags
|
||||||
it_postdata TYPE cnht_post_data_tab
|
IMPORTING
|
||||||
RAISING
|
!it_diff_files_old TYPE tt_file_diff
|
||||||
zcx_abapgit_exception,
|
RAISING
|
||||||
|
zcx_abapgit_exception .
|
||||||
apply_patch_from_form_fields
|
METHODS add_to_stage
|
||||||
IMPORTING
|
RAISING
|
||||||
it_postdata TYPE cnht_post_data_tab
|
zcx_abapgit_exception .
|
||||||
RAISING
|
METHODS refresh
|
||||||
zcx_abapgit_exception,
|
IMPORTING
|
||||||
|
!iv_action TYPE clike
|
||||||
restore_patch_flags
|
RAISING
|
||||||
IMPORTING
|
zcx_abapgit_exception .
|
||||||
it_diff_files_old TYPE tt_file_diff
|
METHODS refresh_full
|
||||||
RAISING
|
RAISING
|
||||||
zcx_abapgit_exception,
|
zcx_abapgit_exception .
|
||||||
|
METHODS refresh_local
|
||||||
add_to_stage
|
RAISING
|
||||||
RAISING
|
zcx_abapgit_exception .
|
||||||
zcx_abapgit_exception,
|
METHODS refresh_local_object
|
||||||
|
IMPORTING
|
||||||
refresh
|
!iv_action TYPE clike
|
||||||
IMPORTING
|
RAISING
|
||||||
iv_action TYPE clike
|
zcx_abapgit_exception .
|
||||||
RAISING
|
METHODS apply_patch_all
|
||||||
zcx_abapgit_exception,
|
IMPORTING
|
||||||
|
!iv_patch TYPE string
|
||||||
refresh_full
|
!iv_patch_flag TYPE abap_bool
|
||||||
RAISING
|
RAISING
|
||||||
zcx_abapgit_exception,
|
zcx_abapgit_exception .
|
||||||
|
METHODS are_all_lines_patched
|
||||||
refresh_local
|
IMPORTING
|
||||||
RAISING
|
!it_diff TYPE zif_abapgit_definitions=>ty_diffs_tt
|
||||||
zcx_abapgit_exception,
|
RETURNING
|
||||||
|
VALUE(rv_are_all_lines_patched) TYPE abap_bool .
|
||||||
refresh_local_object
|
METHODS apply_patch_for
|
||||||
IMPORTING
|
IMPORTING
|
||||||
iv_action TYPE clike
|
!iv_filename TYPE string
|
||||||
RAISING
|
!iv_line_index TYPE string
|
||||||
zcx_abapgit_exception,
|
!iv_patch_flag TYPE abap_bool
|
||||||
|
RAISING
|
||||||
apply_patch_all
|
zcx_abapgit_exception .
|
||||||
IMPORTING
|
METHODS get_diff_object
|
||||||
iv_patch TYPE string
|
IMPORTING
|
||||||
iv_patch_flag TYPE abap_bool
|
!iv_filename TYPE string
|
||||||
RAISING
|
RETURNING
|
||||||
zcx_abapgit_exception,
|
VALUE(ro_diff) TYPE REF TO zcl_abapgit_diff
|
||||||
|
RAISING
|
||||||
are_all_lines_patched
|
zcx_abapgit_exception .
|
||||||
IMPORTING
|
METHODS get_diff_line
|
||||||
it_diff TYPE zif_abapgit_definitions=>ty_diffs_tt
|
IMPORTING
|
||||||
RETURNING
|
!io_diff TYPE REF TO zcl_abapgit_diff
|
||||||
VALUE(rv_are_all_lines_patched) TYPE abap_bool,
|
!iv_line_index TYPE string
|
||||||
|
RETURNING
|
||||||
apply_patch_for
|
VALUE(rs_diff) TYPE zif_abapgit_definitions=>ty_diff
|
||||||
IMPORTING
|
RAISING
|
||||||
iv_filename TYPE string
|
zcx_abapgit_exception .
|
||||||
iv_line_index TYPE string
|
METHODS is_every_changed_line_patched
|
||||||
iv_patch_flag TYPE abap_bool
|
RETURNING
|
||||||
RAISING
|
VALUE(rv_everything_patched) TYPE abap_bool .
|
||||||
zcx_abapgit_exception,
|
CLASS-METHODS is_patch_line_possible
|
||||||
|
IMPORTING
|
||||||
get_diff_object
|
!is_diff_line TYPE zif_abapgit_definitions=>ty_diff
|
||||||
IMPORTING
|
RETURNING
|
||||||
iv_filename TYPE string
|
VALUE(rv_is_patch_line_possible) TYPE abap_bool .
|
||||||
RETURNING
|
|
||||||
VALUE(ro_diff) TYPE REF TO zcl_abapgit_diff
|
|
||||||
RAISING
|
|
||||||
zcx_abapgit_exception,
|
|
||||||
|
|
||||||
get_diff_line
|
|
||||||
IMPORTING
|
|
||||||
io_diff TYPE REF TO zcl_abapgit_diff
|
|
||||||
iv_line_index TYPE string
|
|
||||||
RETURNING
|
|
||||||
VALUE(rs_diff) TYPE zif_abapgit_definitions=>ty_diff
|
|
||||||
RAISING
|
|
||||||
zcx_abapgit_exception,
|
|
||||||
|
|
||||||
is_every_changed_line_patched
|
|
||||||
RETURNING
|
|
||||||
VALUE(rv_everything_patched) TYPE abap_bool.
|
|
||||||
|
|
||||||
CLASS-METHODS:
|
|
||||||
is_patch_line_possible
|
|
||||||
IMPORTING
|
|
||||||
is_diff_line TYPE zif_abapgit_definitions=>ty_diff
|
|
||||||
RETURNING
|
|
||||||
VALUE(rv_is_patch_line_possible) TYPE abap_bool.
|
|
||||||
|
|
||||||
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.
|
||||||
|
|
||||||
|
|
||||||
|
@ -579,9 +558,9 @@ CLASS ZCL_ABAPGIT_GUI_PAGE_PATCH IMPLEMENTATION.
|
||||||
|
|
||||||
mv_section_count = mv_section_count + 1.
|
mv_section_count = mv_section_count + 1.
|
||||||
|
|
||||||
io_html->add( |<th class="patch">| ).
|
ii_html->add( |<th class="patch">| ).
|
||||||
io_html->add_checkbox( iv_id = |patch_section_{ get_normalized_fname_with_path( is_diff ) }_{ mv_section_count }| ).
|
ii_html->add_checkbox( iv_id = |patch_section_{ get_normalized_fname_with_path( is_diff ) }_{ mv_section_count }| ).
|
||||||
io_html->add( '</th>' ).
|
ii_html->add( '</th>' ).
|
||||||
|
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
@ -630,13 +609,13 @@ CLASS ZCL_ABAPGIT_GUI_PAGE_PATCH IMPLEMENTATION.
|
||||||
|
|
||||||
METHOD render_line_split_row.
|
METHOD render_line_split_row.
|
||||||
|
|
||||||
render_patch( io_html = io_html
|
render_patch( ii_html = ii_html
|
||||||
iv_filename = iv_filename
|
iv_filename = iv_filename
|
||||||
is_diff_line = is_diff_line
|
is_diff_line = is_diff_line
|
||||||
iv_index = iv_index ).
|
iv_index = iv_index ).
|
||||||
|
|
||||||
super->render_line_split_row(
|
super->render_line_split_row(
|
||||||
io_html = io_html
|
ii_html = ii_html
|
||||||
iv_filename = iv_filename
|
iv_filename = iv_filename
|
||||||
is_diff_line = is_diff_line
|
is_diff_line = is_diff_line
|
||||||
iv_index = iv_index
|
iv_index = iv_index
|
||||||
|
@ -667,16 +646,16 @@ CLASS ZCL_ABAPGIT_GUI_PAGE_PATCH IMPLEMENTATION.
|
||||||
|
|
||||||
lv_id = |{ iv_filename }_{ mv_section_count }_{ iv_index }|.
|
lv_id = |{ iv_filename }_{ mv_section_count }_{ iv_index }|.
|
||||||
|
|
||||||
io_html->add( |<td class="{ lc_css_class-patch }">| ).
|
ii_html->add( |<td class="{ lc_css_class-patch }">| ).
|
||||||
io_html->add_checkbox(
|
ii_html->add_checkbox(
|
||||||
iv_id = |patch_line_{ lv_id }|
|
iv_id = |patch_line_{ lv_id }|
|
||||||
iv_checked = lv_patched ).
|
iv_checked = lv_patched ).
|
||||||
io_html->add( |</td>| ).
|
ii_html->add( |</td>| ).
|
||||||
|
|
||||||
ELSE.
|
ELSE.
|
||||||
|
|
||||||
io_html->add( |<td class="{ lc_css_class-patch }">| ).
|
ii_html->add( |<td class="{ lc_css_class-patch }">| ).
|
||||||
io_html->add( |</td>| ).
|
ii_html->add( |</td>| ).
|
||||||
|
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ CLASS zcl_abapgit_gui_page_stage DEFINITION
|
||||||
|
|
||||||
DATA mo_repo TYPE REF TO zcl_abapgit_repo_online .
|
DATA mo_repo TYPE REF TO zcl_abapgit_repo_online .
|
||||||
DATA ms_files TYPE zif_abapgit_definitions=>ty_stage_files .
|
DATA ms_files TYPE zif_abapgit_definitions=>ty_stage_files .
|
||||||
DATA mv_seed TYPE string . " Unique page id to bind JS sessionStorage
|
DATA mv_seed TYPE string . " Unique page id to bind JS sessionStorage
|
||||||
DATA mv_filter_value TYPE string .
|
DATA mv_filter_value TYPE string .
|
||||||
|
|
||||||
METHODS find_changed_by
|
METHODS find_changed_by
|
||||||
|
@ -96,7 +96,7 @@ CLASS zcl_abapgit_gui_page_stage DEFINITION
|
||||||
zcx_abapgit_exception .
|
zcx_abapgit_exception .
|
||||||
METHODS render_master_language_warning
|
METHODS render_master_language_warning
|
||||||
RETURNING
|
RETURNING
|
||||||
VALUE(ro_html) TYPE REF TO zcl_abapgit_html .
|
VALUE(ri_html) TYPE REF TO zif_abapgit_html .
|
||||||
METHODS count_default_files_to_commit
|
METHODS count_default_files_to_commit
|
||||||
RETURNING
|
RETURNING
|
||||||
VALUE(rv_count) TYPE i .
|
VALUE(rv_count) TYPE i .
|
||||||
|
@ -502,12 +502,12 @@ CLASS ZCL_ABAPGIT_GUI_PAGE_STAGE IMPLEMENTATION.
|
||||||
|
|
||||||
DATA: ls_dot_abapgit TYPE zif_abapgit_dot_abapgit=>ty_dot_abapgit.
|
DATA: ls_dot_abapgit TYPE zif_abapgit_dot_abapgit=>ty_dot_abapgit.
|
||||||
|
|
||||||
CREATE OBJECT ro_html.
|
CREATE OBJECT ri_html TYPE zcl_abapgit_html.
|
||||||
|
|
||||||
ls_dot_abapgit = mo_repo->get_dot_abapgit( )->get_data( ).
|
ls_dot_abapgit = mo_repo->get_dot_abapgit( )->get_data( ).
|
||||||
|
|
||||||
IF ls_dot_abapgit-master_language <> sy-langu.
|
IF ls_dot_abapgit-master_language <> sy-langu.
|
||||||
ro_html->add( zcl_abapgit_gui_chunk_lib=>render_warning_banner(
|
ri_html->add( zcl_abapgit_gui_chunk_lib=>render_warning_banner(
|
||||||
|Caution: Master language of the repo is '{ ls_dot_abapgit-master_language }', |
|
|Caution: Master language of the repo is '{ ls_dot_abapgit-master_language }', |
|
||||||
&& |but you're logged on in '{ sy-langu }'| ) ).
|
&& |but you're logged on in '{ sy-langu }'| ) ).
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
|
@ -69,7 +69,7 @@ CLASS ZCL_ABAPGIT_GUI_PAGE_SYNTAX IMPLEMENTATION.
|
||||||
|
|
||||||
IF lines( mt_result ) = 0.
|
IF lines( mt_result ) = 0.
|
||||||
ri_html->add( '<div class="dummydiv success">' ).
|
ri_html->add( '<div class="dummydiv success">' ).
|
||||||
ri_html->add( zcl_abapgit_html=>icon( 'check' ) ).
|
ri_html->add( ri_html->icon( 'check' ) ).
|
||||||
ri_html->add( 'No syntax errors' ).
|
ri_html->add( 'No syntax errors' ).
|
||||||
ri_html->add( '</div>' ).
|
ri_html->add( '</div>' ).
|
||||||
ELSE.
|
ELSE.
|
||||||
|
|
|
@ -102,7 +102,7 @@ CLASS ZCL_ABAPGIT_GUI_PAGE_TUTORIAL IMPLEMENTATION.
|
||||||
ri_html->add( '<h2>Repository list and favorites</h2>' ).
|
ri_html->add( '<h2>Repository list and favorites</h2>' ).
|
||||||
ri_html->add( '<p><ul>' ).
|
ri_html->add( '<p><ul>' ).
|
||||||
ri_html->add( |<li>To favorite a repository, use the {
|
ri_html->add( |<li>To favorite a repository, use the {
|
||||||
zcl_abapgit_html=>icon( 'star/darkgrey' ) } icon in the repository list.</li>| ).
|
ri_html->icon( 'star/darkgrey' ) } icon in the repository list.</li>| ).
|
||||||
ri_html->add( |<li>To go to a repository, click on the repository name.</li>| ).
|
ri_html->add( |<li>To go to a repository, click on the repository name.</li>| ).
|
||||||
ri_html->add( |<li>To go back to your favorites, use the| ).
|
ri_html->add( |<li>To go back to your favorites, use the| ).
|
||||||
ri_html->add_a(
|
ri_html->add_a(
|
||||||
|
|
|
@ -1054,7 +1054,7 @@ CLASS ZCL_ABAPGIT_GUI_PAGE_VIEW_REPO IMPLEMENTATION.
|
||||||
CREATE OBJECT ri_html TYPE zcl_abapgit_html.
|
CREATE OBJECT ri_html TYPE zcl_abapgit_html.
|
||||||
|
|
||||||
ri_html->add( '<tr class="folder">' ).
|
ri_html->add( '<tr class="folder">' ).
|
||||||
ri_html->add( |<td class="icon">{ zcl_abapgit_html=>icon( 'folder' ) }</td>| ).
|
ri_html->add( |<td class="icon">{ ri_html->icon( 'folder' ) }</td>| ).
|
||||||
ri_html->add( |<td class="object" colspan="4">{ build_dir_jump_link( '..' ) }</td>| ).
|
ri_html->add( |<td class="object" colspan="4">{ build_dir_jump_link( '..' ) }</td>| ).
|
||||||
IF mo_repo->has_remote_source( ) = abap_true.
|
IF mo_repo->has_remote_source( ) = abap_true.
|
||||||
ri_html->add( |<td colspan="1"></td>| ). " Dummy for online
|
ri_html->add( |<td colspan="1"></td>| ). " Dummy for online
|
||||||
|
|
|
@ -333,11 +333,11 @@ CLASS ZCL_ABAPGIT_GUI_REPO_OVER IMPLEMENTATION.
|
||||||
ii_html->add( |<tr class="repo { lv_favorite_class }">| ).
|
ii_html->add( |<tr class="repo { lv_favorite_class }">| ).
|
||||||
ii_html->add( |<td class="wmin">| ).
|
ii_html->add( |<td class="wmin">| ).
|
||||||
ii_html->add_a( iv_act = |{ zif_abapgit_definitions=>c_action-repo_toggle_fav }?{ <ls_overview>-key }|
|
ii_html->add_a( iv_act = |{ zif_abapgit_definitions=>c_action-repo_toggle_fav }?{ <ls_overview>-key }|
|
||||||
iv_txt = zcl_abapgit_html=>icon( iv_name = lv_favorite_icon
|
iv_txt = ii_html->icon( iv_name = lv_favorite_icon
|
||||||
iv_class = 'pad-sides'
|
iv_class = 'pad-sides'
|
||||||
iv_hint = 'Click to toggle favorite' ) ).
|
iv_hint = 'Click to toggle favorite' ) ).
|
||||||
ii_html->add( |</td>| ).
|
ii_html->add( |</td>| ).
|
||||||
ii_html->add( |<td class="wmin">{ zcl_abapgit_html=>icon( lv_type_icon ) }</td>| ).
|
ii_html->add( |<td class="wmin">{ ii_html->icon( lv_type_icon ) }</td>| ).
|
||||||
|
|
||||||
ii_html->add( |<td>{ ii_html->a( iv_txt = <ls_overview>-name
|
ii_html->add( |<td>{ ii_html->a( iv_txt = <ls_overview>-name
|
||||||
iv_act = |{ c_action-select }?{ <ls_overview>-key }| ) }</td>| ).
|
iv_act = |{ c_action-select }?{ <ls_overview>-key }| ) }</td>| ).
|
||||||
|
|
Loading…
Reference in New Issue
Block a user