mirror of
https://github.com/abapGit/abapGit.git
synced 2025-04-30 20:03:20 +08:00
Remove duplicate labels from Command Palette. (#6821)
Co-authored-by: Marc Bernard <59966492+mbtools@users.noreply.github.com> Co-authored-by: Marc Bernard <marc@marcbernardtools.com>
This commit is contained in:
parent
9295929903
commit
687c91bcf5
|
@ -177,6 +177,7 @@ CLASS zcl_abapgit_gui_chunk_lib DEFINITION
|
|||
it_labels TYPE string_table
|
||||
io_label_colors TYPE REF TO zcl_abapgit_string_map
|
||||
iv_clickable_action TYPE string OPTIONAL
|
||||
iv_unlisted TYPE abap_bool DEFAULT abap_false
|
||||
RETURNING
|
||||
VALUE(rv_html) TYPE string.
|
||||
|
||||
|
@ -661,6 +662,7 @@ CLASS zcl_abapgit_gui_chunk_lib IMPLEMENTATION.
|
|||
DATA lt_fragments TYPE string_table.
|
||||
DATA lv_l TYPE string.
|
||||
DATA lv_class TYPE string.
|
||||
DATA lv_class_cmd TYPE string.
|
||||
DATA lv_style TYPE string.
|
||||
DATA ls_parsed_color TYPE zcl_abapgit_repo_labels=>ty_color.
|
||||
DATA li_html TYPE REF TO zif_abapgit_html.
|
||||
|
@ -669,6 +671,11 @@ CLASS zcl_abapgit_gui_chunk_lib IMPLEMENTATION.
|
|||
RETURN.
|
||||
ENDIF.
|
||||
|
||||
lv_class_cmd = 'command'.
|
||||
IF iv_unlisted = abap_true.
|
||||
lv_class_cmd = lv_class_cmd && ' unlisted'.
|
||||
ENDIF.
|
||||
|
||||
li_html = zcl_abapgit_html=>create( ).
|
||||
|
||||
APPEND `<ul class="repo-labels">` TO lt_fragments.
|
||||
|
@ -699,7 +706,7 @@ CLASS zcl_abapgit_gui_chunk_lib IMPLEMENTATION.
|
|||
lv_l = li_html->a(
|
||||
iv_txt = lv_l
|
||||
iv_act = |{ iv_clickable_action }|
|
||||
iv_class = 'command'
|
||||
iv_class = lv_class_cmd
|
||||
iv_query = lv_l ).
|
||||
ENDIF.
|
||||
lv_l = |<li{ lv_class }{ lv_style }>{ lv_l }</li>|.
|
||||
|
|
|
@ -763,6 +763,7 @@ CLASS zcl_abapgit_gui_page_repo_over IMPLEMENTATION.
|
|||
iv_content = zcl_abapgit_gui_chunk_lib=>render_label_list(
|
||||
it_labels = is_repo-labels
|
||||
io_label_colors = mo_label_colors
|
||||
iv_unlisted = abap_true
|
||||
iv_clickable_action = c_action-label_filter )
|
||||
iv_class = 'labels' ).
|
||||
ENDIF.
|
||||
|
|
|
@ -2403,7 +2403,7 @@ function enumerateUiActions() {
|
|||
// - label links
|
||||
// - command links
|
||||
// - other header links
|
||||
[].slice.call(document.querySelectorAll("form a, a.command, #header ul:not([id*='toolbar']) a"))
|
||||
[].slice.call(document.querySelectorAll("form a, a.command:not(.unlisted), #header ul:not([id*='toolbar']) a"))
|
||||
.filter(function(anchor) {
|
||||
return !!anchor.title || !!anchor.text;
|
||||
}).forEach(function(anchor) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user