From c5d647c10084e042584293ba17b67663fc371532 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Tue, 19 Aug 2014 21:29:59 +0100 Subject: [PATCH] Improve action-item style --- CRM/Utils/Pager.php | 38 ++++++++++++++++++-------------------- css/civicrm.css | 10 ++++------ 2 files changed, 22 insertions(+), 26 deletions(-) diff --git a/CRM/Utils/Pager.php b/CRM/Utils/Pager.php index cc92c5b397..86d018a0de 100644 --- a/CRM/Utils/Pager.php +++ b/CRM/Utils/Pager.php @@ -281,13 +281,9 @@ class CRM_Utils_Pager extends Pager_Sliding { if ($this->isFirstPage()) { return ''; } - $href = $this->makeURL(self::PAGE_ID, 1); - return sprintf('%s', - $href, - str_replace('%d', 1, $this->_altFirst), - $this->_firstPagePre . $this->_firstPageText . $this->_firstPagePost - ) . $this->_spacesBefore . $this->_spacesAfter; + return $this->formatLink($href, str_replace('%d', 1, $this->_altFirst), $this->_firstPagePre . $this->_firstPageText . $this->_firstPagePost) . + $this->_spacesBefore . $this->_spacesAfter; } /** @@ -297,13 +293,8 @@ class CRM_Utils_Pager extends Pager_Sliding { if ($this->isLastPage()) { return ''; } - $href = $this->makeURL(self::PAGE_ID, $this->_totalPages); - return sprintf('%s', - $href, - str_replace('%d', $this->_totalPages, $this->_altLast), - $this->_lastPagePre . $this->_lastPageText . $this->_lastPagePost - ); + return $this->formatLink($href, str_replace('%d', $this->_totalPages, $this->_altLast), $this->_lastPagePre . $this->_lastPageText . $this->_lastPagePost); } /** @@ -312,10 +303,7 @@ class CRM_Utils_Pager extends Pager_Sliding { function getBackPageLink() { if ($this->_currentPage > 1) { $href = $this->makeURL(self::PAGE_ID, $this->getPreviousPageID()); - return sprintf('%s', - $href, - $this->_altPrev, $this->_prevImg - ) . $this->_spacesBefore . $this->_spacesAfter; + return $this->formatLink($href, $this->_altPrev, $this->_prevImg) . $this->_spacesBefore . $this->_spacesAfter; } return ''; } @@ -326,10 +314,9 @@ class CRM_Utils_Pager extends Pager_Sliding { function getNextPageLink() { if ($this->_currentPage < $this->_totalPages) { $href = $this->makeURL(self::PAGE_ID, $this->getNextPageID()); - return $this->_spacesAfter . sprintf('%s', - $href, - $this->_altNext, $this->_nextImg - ) . $this->_spacesBefore . $this->_spacesAfter; + return $this->_spacesAfter . + $this->formatLink($href, $this->_altNext, $this->_nextImg) . + $this->_spacesBefore . $this->_spacesAfter; } return ''; } @@ -345,5 +332,16 @@ class CRM_Utils_Pager extends Pager_Sliding { } return $href . $value; } + + /** + * Output the html pager link + * @param string $href + * @param string $title + * @param string $image + * @return string + */ + private function formatLink($href, $title, $image) { + return sprintf('%s', $href, $title, $image); + } } diff --git a/css/civicrm.css b/css/civicrm.css index c3818b8d83..e91d0aa7a2 100644 --- a/css/civicrm.css +++ b/css/civicrm.css @@ -1717,6 +1717,7 @@ editor specific classes font-size: .95em; padding: 3px 5px; opacity: 1; + color: #2786c2; } .crm-container .btn-slide .action-item { white-space: normal; @@ -1757,11 +1758,7 @@ editor specific classes background-color: #2F2F2E; } -.crm-container .panel li a { - color: #DFDFDF; -} - -.crm-container .panel li a:hover, +.crm-container .btn-slide .panel li a:hover, .crm-container .crm-participant-list-inner li a:hover, .crm-container .crm-event-links-list-inner li a:hover, .crm-container .crm-contribpage-links-list-inner li a:hover { @@ -1826,11 +1823,12 @@ editor specific classes z-index: 1; } -.crm-container .panel li a { +.crm-container .btn-slide .panel li a { text-decoration: none; padding: 4px; display: block; cursor: pointer; + color: #DFDFDF; } /*class for CMS user name check used in profile*/ -- 2.25.1