From 29aea372a563d0a2bd258735fb09320677fdb903 Mon Sep 17 00:00:00 2001 From: Marc Bernard <59966492+mbtools@users.noreply.github.com> Date: Mon, 2 Nov 2020 03:38:33 -0500 Subject: [PATCH] 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 Co-authored-by: Alexander Tsybulsky --- src/ui/zcl_abapgit_gui_chunk_lib.clas.abap | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/ui/zcl_abapgit_gui_chunk_lib.clas.abap b/src/ui/zcl_abapgit_gui_chunk_lib.clas.abap index 2c501c07c..1d2a1c9d5 100644 --- a/src/ui/zcl_abapgit_gui_chunk_lib.clas.abap +++ b/src/ui/zcl_abapgit_gui_chunk_lib.clas.abap @@ -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 . + -local_settings-display_name = li_repo_srv->get( -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 . - lo_repo = li_repo_srv->get( -key ). " inefficient lv_repo_json = |\{ key: "{ -key }", isOffline: "{ -offline - }", displayName: "{ lo_repo->get_name( ) }" \}|. + }", displayName: "{ -local_settings-display_name }" \}|. IF sy-tabix < lv_size. lv_repo_json = lv_repo_json && ','. ENDIF.