From a9cf6070171bd12153a3f54a6c43a570d6ee5e01 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Wed, 10 Feb 2021 10:09:31 -0500 Subject: [PATCH] Apply bootstrap theme to searchKit dashlets --- CRM/Contact/Page/DashBoard.php | 4 +++- ext/search/ang/crmSearchDisplayList.ang.php | 1 + ext/search/ang/crmSearchDisplayTable.ang.php | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CRM/Contact/Page/DashBoard.php b/CRM/Contact/Page/DashBoard.php index 07f6c78ea3f1..55d48127df4e 100644 --- a/CRM/Contact/Page/DashBoard.php +++ b/CRM/Contact/Page/DashBoard.php @@ -79,7 +79,9 @@ public static function angularPartials($moduleName, $module) { $partials = []; foreach (CRM_Core_BAO_Dashboard::getContactDashlets() as $dashlet) { if (!empty($dashlet['directive'])) { - $partials["~/$moduleName/directives/{$dashlet['directive']}.html"] = "<{$dashlet['directive']}>"; + // FIXME: Wrapping each directive in
produces invalid html (duplicate ids in the dom) + // but it's the only practical way to selectively apply boostrap3 theming to specific dashlets + $partials["~/$moduleName/directives/{$dashlet['directive']}.html"] = "
<{$dashlet['directive']}>
"; } } return $partials; diff --git a/ext/search/ang/crmSearchDisplayList.ang.php b/ext/search/ang/crmSearchDisplayList.ang.php index 0538ee815ddb..62c961dee4fe 100644 --- a/ext/search/ang/crmSearchDisplayList.ang.php +++ b/ext/search/ang/crmSearchDisplayList.ang.php @@ -10,6 +10,7 @@ ], 'basePages' => ['civicrm/search', 'civicrm/admin/search'], 'requires' => ['crmSearchDisplay', 'crmUi', 'ui.bootstrap'], + 'bundles' => ['bootstrap3'], 'exports' => [ 'crm-search-display-list' => 'E', ], diff --git a/ext/search/ang/crmSearchDisplayTable.ang.php b/ext/search/ang/crmSearchDisplayTable.ang.php index ea24b14ccc8a..b1c65325e147 100644 --- a/ext/search/ang/crmSearchDisplayTable.ang.php +++ b/ext/search/ang/crmSearchDisplayTable.ang.php @@ -10,6 +10,7 @@ ], 'basePages' => ['civicrm/search', 'civicrm/admin/search'], 'requires' => ['crmSearchDisplay', 'crmUi', 'crmSearchActions', 'ui.bootstrap'], + 'bundles' => ['bootstrap3'], 'exports' => [ 'crm-search-display-table' => 'E', ],