From 5bfe2898116e3d40c442b9380f1da1665d243246 Mon Sep 17 00:00:00 2001 From: Felix Niklas Date: Tue, 10 Mar 2020 16:19:41 +0100 Subject: [PATCH] ColumnSelect: hide group labels when filtering --- .../javascripts/app/lib/app_post/column_select.coffee | 1 + .../javascripts/app/views/generic/column_select.jst.eco | 2 +- app/assets/stylesheets/zammad.scss | 6 +++++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/app/lib/app_post/column_select.coffee b/app/assets/javascripts/app/lib/app_post/column_select.coffee index c1a38c777..3cd4e1a2a 100644 --- a/app/assets/javascripts/app/lib/app_post/column_select.coffee +++ b/app/assets/javascripts/app/lib/app_post/column_select.coffee @@ -132,6 +132,7 @@ class App.ColumnSelect extends Spine.Controller $(el).addClass('is-filtered') @clearButton.toggleClass 'is-hidden', filter.length is 0 + @pool.toggleClass 'filter-active', filter.length != 0 clear: -> @search.val('') diff --git a/app/assets/javascripts/app/views/generic/column_select.jst.eco b/app/assets/javascripts/app/views/generic/column_select.jst.eco index e5a29f295..82a12872f 100644 --- a/app/assets/javascripts/app/views/generic/column_select.jst.eco +++ b/app/assets/javascripts/app/views/generic/column_select.jst.eco @@ -34,7 +34,7 @@
<% for option in @attribute.options: %> <% if option.group != undefined: %> -
<%= option.label %>
+
<%= option.label %>
<% for o in option.group: %>
<%= o.name %>
<% end %> diff --git a/app/assets/stylesheets/zammad.scss b/app/assets/stylesheets/zammad.scss index b981645a3..59986cf9e 100644 --- a/app/assets/stylesheets/zammad.scss +++ b/app/assets/stylesheets/zammad.scss @@ -10099,9 +10099,13 @@ output { } } - &-divider { + &-group-label { opacity: 0.5; + .filter-active & { + display: none; + } + ~ .columnSelect-option { padding-left: 10px; }