Skip to content

Commit

Permalink
Merge pull request #19577 from colemanw/bootstrapDashlets
Browse files Browse the repository at this point in the history
Apply bootstrap theme to searchKit dashlets
  • Loading branch information
seamuslee001 authored Feb 11, 2021
2 parents 122a421 + a9cf607 commit e0d7c06
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CRM/Contact/Page/DashBoard.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']}></{$dashlet['directive']}>";
// FIXME: Wrapping each directive in <div id='bootstrap-theme'> 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"] = "<div id='bootstrap-theme'><{$dashlet['directive']}></{$dashlet['directive']}></div>";
}
}
return $partials;
Expand Down
1 change: 1 addition & 0 deletions ext/search/ang/crmSearchDisplayList.ang.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
],
'basePages' => ['civicrm/search', 'civicrm/admin/search'],
'requires' => ['crmSearchDisplay', 'crmUi', 'ui.bootstrap'],
'bundles' => ['bootstrap3'],
'exports' => [
'crm-search-display-list' => 'E',
],
Expand Down
1 change: 1 addition & 0 deletions ext/search/ang/crmSearchDisplayTable.ang.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
],
'basePages' => ['civicrm/search', 'civicrm/admin/search'],
'requires' => ['crmSearchDisplay', 'crmUi', 'crmSearchActions', 'ui.bootstrap'],
'bundles' => ['bootstrap3'],
'exports' => [
'crm-search-display-table' => 'E',
],
Expand Down

0 comments on commit e0d7c06

Please sign in to comment.