From 9ec7a3a08d76433383c8e746456a2df669c3dcd2 Mon Sep 17 00:00:00 2001 From: colemanw Date: Tue, 20 Feb 2024 17:34:02 -0500 Subject: [PATCH] News Dashlet - Fix styling of unread items Adjusts css to target the new disclosure element markup, and removes dependence on the deprecated `crmAccordion:open` event. --- templates/CRM/Dashlet/Page/Blog.tpl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/templates/CRM/Dashlet/Page/Blog.tpl b/templates/CRM/Dashlet/Page/Blog.tpl index cdf9edc472..52edd33caf 100644 --- a/templates/CRM/Dashlet/Page/Blog.tpl +++ b/templates/CRM/Dashlet/Page/Blog.tpl @@ -16,18 +16,18 @@ #civicrm-news-feed .crm-news-feed-unread .crm-news-feed-item-title { font-weight: bold; } - #civicrm-news-feed .collapsed .crm-accordion-header { + #civicrm-news-feed details:not([open]) .crm-accordion-header { text-overflow: ellipsis; text-wrap: none; white-space: nowrap; overflow: hidden; } #civicrm-news-feed .crm-news-feed-item-preview { + display: inline; color: #8d8d8d; - display: none; } - #civicrm-news-feed .collapsed .crm-news-feed-item-preview { - display: inline; + #civicrm-news-feed details[open] .crm-news-feed-item-preview { + display: none; } #civicrm-news-feed .crm-news-feed-item-link { margin-bottom: 0; @@ -88,7 +88,7 @@ if ($.inArray(itemKey, opened[key]) < 0) { $(this).addClass('crm-news-feed-unread'); ++count; - $(this).one('crmAccordion:open', function () { + $(this).one('click', function () { $(this).removeClass('crm-news-feed-unread'); $('em', $tab).text(--count || ''); opened[key].push(itemKey); -- 2.25.1