From 874043cadb371a1f6a222ec5f6cea412265e144e Mon Sep 17 00:00:00 2001 From: ishikawa999 Date: Tue, 21 Jan 2025 01:37:50 +0000 Subject: [PATCH] Fix toggle-multipleselect icons --- app/assets/images/icons.svg | 9 ++++++++ app/assets/javascripts/application.js | 27 ++++++++++++++++++------ app/assets/stylesheets/application.css | 4 ++-- app/assets/stylesheets/rtl.css | 2 -- app/views/queries/_filters.html.erb | 1 + app/views/workflows/edit.html.erb | 4 ++-- app/views/workflows/permissions.html.erb | 4 ++-- config/icon_source.yml | 4 ++++ 8 files changed, 41 insertions(+), 14 deletions(-) diff --git a/app/assets/images/icons.svg b/app/assets/images/icons.svg index 51e6b550b..a2e004b1e 100644 --- a/app/assets/images/icons.svg +++ b/app/assets/images/icons.svg @@ -455,6 +455,15 @@ + + + + + + + + + diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 935aef4a9..98c8e70d4 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -209,9 +209,19 @@ function buildFilterRow(field, operator, values) { case "list_optional_with_history": case "list_status": case "list_subprojects": + const iconType = values.length > 1 ? 'toggle-minus' : 'toggle-plus'; + const clonedIcon = document.querySelector('#icon-copy-source svg').cloneNode(true); + updateSVGIcon(clonedIcon, iconType); + tr.find('.values').append( - '' + - '  ' + $('', { style: 'display:none;' }).append( + $('