UI: Adjustments to Repo Palette (#4079)

* UI: Adjustments to Repo Palette

- Sort alphabetically
- Pad offline icon (using CSS)

* CSS

* CSS

* Remove css changes

Css is fixed in #4112

Co-authored-by: Lars Hvam <larshp@hotmail.com>
Co-authored-by: Alexander Tsybulsky <sbcgua@users.noreply.github.com>
This commit is contained in:
Marc Bernard 2020-11-02 03:38:33 -05:00 committed by GitHub
parent e7b5281dde
commit 29aea372a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -706,12 +706,17 @@ CLASS zcl_abapgit_gui_chunk_lib IMPLEMENTATION.
CREATE OBJECT ri_html TYPE zcl_abapgit_html.
" Sort list by display name
LOOP AT lt_repo_list ASSIGNING <ls_repo>.
<ls_repo>-local_settings-display_name = li_repo_srv->get( <ls_repo>-key )->get_name( ).
ENDLOOP.
SORT lt_repo_list BY local_settings-display_name AS TEXT.
ri_html->add( 'var repoCatalog = [' ). " Maybe separate this into another method if needed in more places
LOOP AT lt_repo_list ASSIGNING <ls_repo>.
lo_repo = li_repo_srv->get( <ls_repo>-key ). " inefficient
lv_repo_json = |\{ key: "{ <ls_repo>-key
}", isOffline: "{ <ls_repo>-offline
}", displayName: "{ lo_repo->get_name( ) }" \}|.
}", displayName: "{ <ls_repo>-local_settings-display_name }" \}|.
IF sy-tabix < lv_size.
lv_repo_json = lv_repo_json && ','.
ENDIF.