From 4fc35270174434ba765132f8ca7f36346b5f4e44 Mon Sep 17 00:00:00 2001 From: Patrick Yeo Date: Fri, 19 Feb 2021 14:30:16 -0800 Subject: [PATCH] LPS-127831 Sets proper active class depending on search container displayStyle After dropping the BS3-BS4 compat layer, the `active` class no longer works for table displays which need the `table-active` class instead. This commit makes it so the `table-active` class is used for tables (default displayStyle) and `active` for any other visualization. --- .../META-INF/resources/liferay/search_container_select.js | 2 +- .../docroot/html/taglib/ui/search_iterator/lexicon/bottom.jspf | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/apps/frontend-js/frontend-js-aui-web/src/main/resources/META-INF/resources/liferay/search_container_select.js b/modules/apps/frontend-js/frontend-js-aui-web/src/main/resources/META-INF/resources/liferay/search_container_select.js index b857a9bcbcde8a..16a070c27bf41f 100644 --- a/modules/apps/frontend-js/frontend-js-aui-web/src/main/resources/META-INF/resources/liferay/search_container_select.js +++ b/modules/apps/frontend-js/frontend-js-aui-web/src/main/resources/META-INF/resources/liferay/search_container_select.js @@ -76,7 +76,7 @@ AUI.add( rowClassNameActive: { validator: Lang.isString, - value: 'active table-active', + value: 'active', }, rowSelector: { diff --git a/portal-web/docroot/html/taglib/ui/search_iterator/lexicon/bottom.jspf b/portal-web/docroot/html/taglib/ui/search_iterator/lexicon/bottom.jspf index 9668f16a854a7b..7b618e1d0bb791 100644 --- a/portal-web/docroot/html/taglib/ui/search_iterator/lexicon/bottom.jspf +++ b/portal-web/docroot/html/taglib/ui/search_iterator/lexicon/bottom.jspf @@ -65,6 +65,7 @@ { cfg: { keepSelection: rememberCheckBoxState, + rowClassNameActive: '<%= displayStyle.equals(SearchIteratorTag.DEFAULT_DISPLAY_STYLE) ? "table-active" : "active" %>', rowSelector: rowSelector }, fn: A.Plugin.SearchContainerSelect