From 37c9f0f2820f75e980f12f0d07231aed69d537b7 Mon Sep 17 00:00:00 2001
From: Ben Sturmfels
Date: Thu, 23 Nov 2023 14:34:56 +1100
Subject: [PATCH] Remove nesting of hidden sections on sustainer page
This makes the page more similar to how it has worked in previous years.
---
conservancy/static/js/supporter-page.js | 11 -----------
conservancy/templates/supporter/index.html | 2 +-
2 files changed, 1 insertion(+), 12 deletions(-)
diff --git a/conservancy/static/js/supporter-page.js b/conservancy/static/js/supporter-page.js
index 1ae36a46..76dc07d6 100644
--- a/conservancy/static/js/supporter-page.js
+++ b/conservancy/static/js/supporter-page.js
@@ -163,17 +163,6 @@ $(document).ready(function() {
$expandlink.on('click', function(event) {
$expandlink.fadeOut('slow');
$ourexpandablesection.find('.read-more').each(function(index) { $(this).click(); });
- // Don't laugh. I'm running this twice because the expandable
- // sections are hidden by actually their text from the DOM and
- // storing it in a closure, to be reinstated later. That means when
- // the above ".find('.read-more')" runs it only finds the one
- // top-level .read-more element because the children have been
- // temporarily removed from the page. After this top-level element
- // has been clicked to restore it's body, we can run this again and
- // .find() the children elements. I suspect this may have worked in
- // the past if there were multiple sections all at the top-level,
- // rather than being nested under "Our Year in Review".
- $ourexpandablesection.find('.read-more').each(function(index) { $(this).click(); });
});
});
});
diff --git a/conservancy/templates/supporter/index.html b/conservancy/templates/supporter/index.html
index d8605f2e..bee59e93 100644
--- a/conservancy/templates/supporter/index.html
+++ b/conservancy/templates/supporter/index.html
@@ -131,6 +131,7 @@ account will be approved.
+
New staff!
@@ -284,7 +285,6 @@ reach for reproducibility.
-