From 14d47b709211d0d9d490de291398d4460b38722a Mon Sep 17 00:00:00 2001 From: Alexander Berndt Date: Wed, 6 Feb 2019 14:43:42 +0100 Subject: [PATCH 1/2] Fix: Unhide also complex fields like Image or FileUpload, as the css-class is added the a wrapper-div, while the unhide-attribute is stored at the input-field. So the hide/unhide configuration is distributed in two different dom-nodes. --- .../showhidedialogfields/source/showhidedialogfields.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/src/main/content/jcr_root/apps/acs-commons/touchui-widgets/showhidedialogfields/source/showhidedialogfields.js b/content/src/main/content/jcr_root/apps/acs-commons/touchui-widgets/showhidedialogfields/source/showhidedialogfields.js index 10ccb41b3a..b324fcb066 100644 --- a/content/src/main/content/jcr_root/apps/acs-commons/touchui-widgets/showhidedialogfields/source/showhidedialogfields.js +++ b/content/src/main/content/jcr_root/apps/acs-commons/touchui-widgets/showhidedialogfields/source/showhidedialogfields.js @@ -99,7 +99,7 @@ // unhide the target element that contains the selected value as data-showhidetargetvalue attribute function showTarget(target, value){ - $(target).filter("[data-showhidetargetvalue*='" + value + "']").each(function() { + $(target).filter("[data-showhidetargetvalue*='" + value + "'],:has([data-showhidetargetvalue*='" + value + "'])").each(function() { $(this).removeClass('hide'); //If target is a container, unhides the container $(this).closest('.coral-Form-fieldwrapper').removeClass('hide'); // Unhides the target field wrapper. Thus, displaying label, quicktip etc. }); From 25a25d2a734cbb014080d9db44d485cf230803be Mon Sep 17 00:00:00 2001 From: Alexander Berndt Date: Wed, 6 Feb 2019 14:49:44 +0100 Subject: [PATCH 2/2] Fix: Unhide also complex fields like Image or FileUpload, as the css-class is added the a wrapper-div, while the unhide-attribute is stored at the input-field. So the hide/unhide configuration is distributed in two different dom-nodes. --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cfcd4283da..1e305e4a3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com) - #1700 - MCP Forms framework now tracks client libraries required for components as needed ### Fixed +- Fix: Show/hide widgets: feature can now also show/hide complex fields like Image or FileUpload - #1724 - AemEnvironmentIndicatorFilterTest.testDisallowedWcmMode is failed because of caret in windows - #1699 - MCP UI doesn't work because of StackOverflowError exception - #1692 - HttpCache: Refactored resource / group config extensions