X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCore%2FAction.php;h=e1de9c1f270556dd337c9f548f832f5265c48a76;hb=7e5524d42ce21bb4cd64cec30ad63b68d882c108;hp=3e6edc7bfb620366be29264f15acf642866ccaa7;hpb=20de365359fdf2770bf1e19cb58b9898d568e7e9;p=civicrm-core.git diff --git a/CRM/Core/Action.php b/CRM/Core/Action.php index 3e6edc7bfb..e1de9c1f27 100644 --- a/CRM/Core/Action.php +++ b/CRM/Core/Action.php @@ -1,9 +1,9 @@ $link) { if (!$mask || !array_key_exists('bit', $link) || ($mask & $link['bit'])) { $extra = isset($link['extra']) ? self::replace($link['extra'], $values) : NULL; @@ -247,46 +251,40 @@ class CRM_Core_Action { $urlPath = CRM_Utils_Array::value('url', $link, '#'); } - $classes = 'action-item'; - if ($firstLink) { - $firstLink = FALSE; - $classes .= " action-item-first"; - } + $classes = 'action-item crm-hover-button'; if (isset($link['ref'])) { $classes .= ' ' . strtolower($link['ref']); } //get the user specified classes in. if (isset($link['class'])) { - $className = $link['class']; - if (is_array($className)) { - $className = implode(' ', $className); - } + $className = is_array($link['class']) ? implode(' ', $link['class']) : $link['class']; $classes .= ' ' . strtolower($className); } - $linkClasses = 'class="' . $classes . '"'; - if ($urlPath !== '#' && $frontend) { $extra .= ' target="_blank"'; } - $url[] = sprintf('%s', + // Hack to make delete dialogs smaller + if (strpos($urlPath, '/delete') || strpos($urlPath, 'action=delete')) { + $classes .= " small-popup"; + } + $url[] = sprintf('%s', $urlPath, - $linkClasses, - CRM_Utils_Array::value('title', $link), + $classes, + !empty($link['title']) ? "title='{$link['title']}' " : '', $link['name'] ); } } - $result = ''; $mainLinks = $url; if ($enclosedAllInSingleUL) { $allLinks = ''; CRM_Utils_String::append($allLinks, '