From b3d9dd89026408c1a8baad9878e05d5f0b196fea Mon Sep 17 00:00:00 2001 From: colemanw Date: Mon, 4 Dec 2023 10:12:39 +0000 Subject: [PATCH] Afform - Handle details element at runtime --- ext/afform/core/ang/af/afTitle.directive.js | 15 ++++++----- .../ang/afsearchFindContributions.aff.html | 26 +++++++++---------- 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/ext/afform/core/ang/af/afTitle.directive.js b/ext/afform/core/ang/af/afTitle.directive.js index b74a2abe72..9e369bc3da 100644 --- a/ext/afform/core/ang/af/afTitle.directive.js +++ b/ext/afform/core/ang/af/afTitle.directive.js @@ -10,15 +10,16 @@ var ctrl = this; $scope.$watch(function() {return ctrl.title;}, function(text) { - var tag = $element.is('fieldset') ? 'legend' : 'h4', - $title = $element.children(tag + '.af-title'); + let tag = 'h4'; + if ($element.is('fieldset')) { + tag = 'legend'; + } + if ($element.is('details')) { + tag = 'summary'; + } + let $title = $element.children(tag + '.af-title'); if (!$title.length) { $title = $('<' + tag + ' class="af-title" />').prependTo($element); - if ($element.hasClass('af-collapsible')) { - $title.click(function() { - $element.toggleClass('af-collapsed'); - }); - } } $title.text(text); }); diff --git a/ext/civicrm_search_ui/ang/afsearchFindContributions.aff.html b/ext/civicrm_search_ui/ang/afsearchFindContributions.aff.html index dac443abb7..d9ada15c74 100644 --- a/ext/civicrm_search_ui/ang/afsearchFindContributions.aff.html +++ b/ext/civicrm_search_ui/ang/afsearchFindContributions.aff.html @@ -1,13 +1,13 @@

This is intended as a replacement for the Find Contributions page.  Please provide feedback at https://lab.civicrm.org/dev/core/-/issues/4440

-
+
-
-
+ +
@@ -16,8 +16,8 @@ -
-
+ +
@@ -25,22 +25,22 @@
-
+
-
-
- Dev note:  several options currently - need to understand soft credits better!   + +
+ -
-
- Dev note: want this as page name select.   Does anyone use PCP's??? + +
+ -
+
-- 2.25.1