diff --git a/src/ui/core/zcl_abapgit_html.clas.abap b/src/ui/core/zcl_abapgit_html.clas.abap
index f0561bcce..661aaeb37 100644
--- a/src/ui/core/zcl_abapgit_html.clas.abap
+++ b/src/ui/core/zcl_abapgit_html.clas.abap
@@ -8,14 +8,18 @@ CLASS zcl_abapgit_html DEFINITION
ALIASES add
FOR zif_abapgit_html~add .
- ALIASES add_checkbox
- FOR zif_abapgit_html~add_checkbox .
- ALIASES icon
- FOR zif_abapgit_html~icon .
CONSTANTS c_indent_size TYPE i VALUE 2 ##NO_TEXT.
CLASS-METHODS class_constructor .
+ CLASS-METHODS icon
+ IMPORTING
+ !iv_name TYPE string
+ !iv_hint TYPE string OPTIONAL
+ !iv_class TYPE string OPTIONAL
+ !iv_onclick TYPE string OPTIONAL
+ RETURNING
+ VALUE(rv_str) TYPE string .
PROTECTED SECTION.
PRIVATE SECTION.
@@ -117,6 +121,43 @@ CLASS ZCL_ABAPGIT_HTML IMPLEMENTATION.
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 = | |.
+
+ ENDMETHOD.
+
+
METHOD indent_line.
DATA: ls_study TYPE ty_study_result,
@@ -321,37 +362,11 @@ CLASS ZCL_ABAPGIT_HTML IMPLEMENTATION.
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 = | |.
+ rv_str = icon(
+ iv_name = iv_name
+ iv_hint = iv_hint
+ iv_class = iv_class
+ iv_onclick = iv_onclick ).
ENDMETHOD.
diff --git a/src/ui/core/zif_abapgit_html.intf.abap b/src/ui/core/zif_abapgit_html.intf.abap
index a9995e061..e3aa7726b 100644
--- a/src/ui/core/zif_abapgit_html.intf.abap
+++ b/src/ui/core/zif_abapgit_html.intf.abap
@@ -48,7 +48,7 @@ INTERFACE zif_abapgit_html PUBLIC.
IMPORTING
iv_id TYPE string
iv_checked TYPE abap_bool OPTIONAL.
- CLASS-METHODS a
+ METHODS a
IMPORTING
!iv_txt TYPE string
!iv_act TYPE string
@@ -60,7 +60,7 @@ INTERFACE zif_abapgit_html PUBLIC.
!iv_title TYPE string OPTIONAL
RETURNING
VALUE(rv_str) TYPE string .
- CLASS-METHODS icon
+ METHODS icon
IMPORTING
!iv_name TYPE string
!iv_hint TYPE string OPTIONAL
diff --git a/src/ui/zcl_abapgit_gui_chunk_lib.clas.abap b/src/ui/zcl_abapgit_gui_chunk_lib.clas.abap
index fa545e7a7..812a16621 100644
--- a/src/ui/zcl_abapgit_gui_chunk_lib.clas.abap
+++ b/src/ui/zcl_abapgit_gui_chunk_lib.clas.abap
@@ -324,7 +324,7 @@ CLASS ZCL_ABAPGIT_GUI_CHUNK_LIB IMPLEMENTATION.
ENDIF.
ri_html->add( |
| ).
- ri_html->add( |{ zcl_abapgit_html=>icon( 'exclamation-circle/red' ) } Error: { lv_error }| ).
+ ri_html->add( |{ ri_html->icon( 'exclamation-circle/red' ) } Error: { lv_error }| ).
ri_html->add( '
' ).
ENDMETHOD.
@@ -516,7 +516,7 @@ CLASS ZCL_ABAPGIT_GUI_CHUNK_LIB IMPLEMENTATION.
METHOD render_js_error_banner.
CREATE OBJECT ri_html TYPE zcl_abapgit_html.
ri_html->add( '' ).
- ri_html->add( |{ zcl_abapgit_html=>icon( 'exclamation-triangle/red' ) }| &&
+ ri_html->add( |{ ri_html->icon( 'exclamation-triangle/red' ) }| &&
' If this does not disappear soon,' &&
' then there is a JS init error, please log an issue' ).
ri_html->add( '
' ).
@@ -723,9 +723,9 @@ CLASS ZCL_ABAPGIT_GUI_CHUNK_LIB IMPLEMENTATION.
ENDIF.
ri_html->add_a( iv_act = |toggleDisplay('news')|
iv_typ = zif_abapgit_html=>c_action_type-onclick
- iv_txt = zcl_abapgit_html=>icon( iv_name = lv_icon
- iv_class = 'pad-sides'
- iv_hint = 'Display changelog' ) ).
+ iv_txt = ri_html->icon( iv_name = lv_icon
+ iv_class = 'pad-sides'
+ iv_hint = 'Display changelog' ) ).
ENDIF.
ri_html->add( '' ).
@@ -738,9 +738,9 @@ CLASS ZCL_ABAPGIT_GUI_CHUNK_LIB IMPLEMENTATION.
lv_icon = 'star/grey'.
ENDIF.
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_class = 'pad-sides'
- iv_hint = 'Click to toggle favorite' ) ).
+ iv_txt = ri_html->icon( iv_name = lv_icon
+ iv_class = 'pad-sides'
+ iv_hint = 'Click to toggle favorite' ) ).
" BG
IF lo_pback->exists( io_repo->get_key( ) ) = abap_true.
@@ -800,17 +800,15 @@ CLASS ZCL_ABAPGIT_GUI_CHUNK_LIB IMPLEMENTATION.
lv_commit_hash = io_repo_online->get_sha1_remote( ).
lv_commit_short_hash = lv_commit_hash(7).
-
- lv_icon_commit = zcl_abapgit_html=>icon( iv_name = 'code-commit'
- iv_class = 'pad-sides'
- iv_hint = 'Commit' ).
+ lv_icon_commit = ii_html->icon( iv_name = 'code-commit'
+ iv_class = 'pad-sides'
+ iv_hint = 'Commit' ).
TRY.
lv_display_url = io_repo_online->get_commit_display_url( lv_commit_hash ).
ii_html->add_a( iv_txt = |{ lv_icon_commit }{ lv_commit_short_hash }|
- iv_act = |{ zif_abapgit_definitions=>c_action-url }?|
- && lv_display_url
+ iv_act = |{ zif_abapgit_definitions=>c_action-url }?| && lv_display_url
iv_class = |url| ).
CATCH zcx_abapgit_exception.
ii_html->add( |{ lv_icon_commit }{ lv_commit_short_hash } | ).
diff --git a/src/ui/zcl_abapgit_gui_page_bkg.clas.abap b/src/ui/zcl_abapgit_gui_page_bkg.clas.abap
index ea69a6d7e..ca8f2ca92 100644
--- a/src/ui/zcl_abapgit_gui_page_bkg.clas.abap
+++ b/src/ui/zcl_abapgit_gui_page_bkg.clas.abap
@@ -8,8 +8,8 @@ CLASS zcl_abapgit_gui_page_bkg DEFINITION
METHODS constructor
IMPORTING
- iv_key TYPE zif_abapgit_persistence=>ty_repo-key
- RAISING zcx_abapgit_exception.
+ iv_key TYPE zif_abapgit_persistence=>ty_repo-key
+ RAISING zcx_abapgit_exception.
METHODS zif_abapgit_gui_event_handler~on_event
REDEFINITION .
@@ -26,12 +26,12 @@ CLASS zcl_abapgit_gui_page_bkg DEFINITION
IMPORTING
!is_per TYPE zcl_abapgit_persist_background=>ty_background
RETURNING
- VALUE(ro_html) TYPE REF TO zcl_abapgit_html .
+ VALUE(ri_html) TYPE REF TO zif_abapgit_html .
METHODS render_settings
IMPORTING
!is_per TYPE zcl_abapgit_persist_background=>ty_background
RETURNING
- VALUE(ro_html) TYPE REF TO zcl_abapgit_html .
+ VALUE(ri_html) TYPE REF TO zif_abapgit_html .
METHODS build_menu
RETURNING
VALUE(ro_menu) TYPE REF TO zcl_abapgit_html_toolbar .
@@ -42,7 +42,7 @@ CLASS zcl_abapgit_gui_page_bkg DEFINITION
zcx_abapgit_exception .
METHODS render
RETURNING
- VALUE(ro_html) TYPE REF TO zcl_abapgit_html
+ VALUE(ri_html) TYPE REF TO zif_abapgit_html
RAISING
zcx_abapgit_exception .
METHODS decode
@@ -164,39 +164,39 @@ CLASS ZCL_ABAPGIT_GUI_PAGE_BKG IMPLEMENTATION.
ls_per = read_persist( lo_repo ).
- CREATE OBJECT ro_html.
+ CREATE OBJECT ri_html TYPE zcl_abapgit_html.
- ro_html->add( '' ).
+ ri_html->add( '
' ).
- ro_html->add( zcl_abapgit_gui_chunk_lib=>render_repo_top( lo_repo ) ).
- ro_html->add( '
' ).
+ ri_html->add( zcl_abapgit_gui_chunk_lib=>render_repo_top( lo_repo ) ).
+ ri_html->add( '
' ).
- ro_html->add( render_methods( ls_per ) ).
+ ri_html->add( render_methods( ls_per ) ).
- ro_html->add( '
HTTP Authentication, optional ' ).
- ro_html->add( '(password will be saved in clear text)
' ).
- ro_html->add( '
' ).
+ ri_html->add( '
HTTP Authentication, optional ' ).
+ ri_html->add( '(password will be saved in clear text)
' ).
+ ri_html->add( '
' ).
- ro_html->add( '
' ).
+ ri_html->add( '
' ).
- ro_html->add( render_settings( ls_per ) ).
+ ri_html->add( render_settings( ls_per ) ).
- ro_html->add( '
' ).
- ro_html->add( '
' ).
+ ri_html->add( '
' ).
+ ri_html->add( '
' ).
- ro_html->add( '' ).
- ro_html->add( '
' ).
+ ri_html->add( '' ).
+ ri_html->add( '
' ).
- ro_html->add( '
' ).
+ ri_html->add( '
' ).
ENDMETHOD.
@@ -217,18 +217,18 @@ CLASS ZCL_ABAPGIT_GUI_PAGE_BKG IMPLEMENTATION.
lv_checked TYPE string.
- CREATE OBJECT ro_html.
+ CREATE OBJECT ri_html TYPE zcl_abapgit_html.
lt_methods = zcl_abapgit_background=>list_methods( ).
- ro_html->add( 'Method ' ).
- ro_html->add( |