From 713b4228ced337cde7dac4b459e290dc4a099f91 Mon Sep 17 00:00:00 2001 From: Brian Shaughnessy Date: Fri, 15 Mar 2013 14:25:57 -0400 Subject: [PATCH] CRM-12096 fix quickicon image for j3.0 --- admin/plugins/civicrmicon/civicrmicon.php | 22 ++++++++++++++++++++-- admin/plugins/civicrmicon/civicrmicon.xml | 1 + admin/plugins/civicrmicon/smallLogo14.png | Bin 0 -> 694 bytes 3 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 admin/plugins/civicrmicon/smallLogo14.png diff --git a/admin/plugins/civicrmicon/civicrmicon.php b/admin/plugins/civicrmicon/civicrmicon.php index 75541994..5545afb2 100644 --- a/admin/plugins/civicrmicon/civicrmicon.php +++ b/admin/plugins/civicrmicon/civicrmicon.php @@ -39,13 +39,31 @@ public function __construct(&$subject, $config) { */ public function onGetIcons($context) { jimport('joomla.environment.uri'); - return array( + $icon = array( array( 'link' => 'index.php?option=com_civicrm', 'image' => JURI::base() . 'components/com_civicrm/civicrm/i/smallLogo.png', 'text' => 'CiviCRM', 'id' => 'plg_quickicon_civicrmicon', - )); + ) + ); + + //image must be handled via css class in J3.0 + if (version_compare(JVERSION, '3.0', 'ge')) { + $img = JURI::root() . 'plugins/quickicon/civicrmicon/smallLogo14.png'; + $css = ' + .icon-civicrm, .icon-civicrm-open { + background-image:url("'.$img.'"); + } + '; + $document =& JFactory::getDocument(); + $document->addStyleDeclaration( $css ); + $icon[0]['image'] = 'civicrm'; + } else { + $icon[0]['image'] = JURI::base() . 'components/com_civicrm/civicrm/i/smallLogo.png'; + } + + return $icon; } } diff --git a/admin/plugins/civicrmicon/civicrmicon.xml b/admin/plugins/civicrmicon/civicrmicon.xml index 521b0e9d..e9b00dd5 100644 --- a/admin/plugins/civicrmicon/civicrmicon.xml +++ b/admin/plugins/civicrmicon/civicrmicon.xml @@ -12,5 +12,6 @@ civicrmicon.php index.html + smallLogo14.png diff --git a/admin/plugins/civicrmicon/smallLogo14.png b/admin/plugins/civicrmicon/smallLogo14.png new file mode 100644 index 0000000000000000000000000000000000000000..e12f5b8857365f0fb6394e73b16f637df52b2a8e GIT binary patch literal 694 zcmV;n0!jUeP)L`Lqx@T}EetX=PFaeN2q8xNJR7S4ssUF&G(u@H>21*2xYwvmfWFcXxP$MvFw*i|I z;Y%c?9sRay`@Y7WQjy4{FDLYBiopMhhn`$v1W|07@Fm7t z9xre(;KtDJ#-`!VIK%QsP>oLMJYZI5=^P8RAnJ>3NF+i&d!ymJ=UkKZQK#h{p(G*A zG2s0}Tala)?XK6kL`eWnlFCaBfxmhVvA_27peW7C`dt7_O2{Q&*b*z({L9`~+{%35{) zt&l(qxx@OQdA$Frmy_?cd2MN(Ic=W|gkW$M_c?!lUCwg0;-X}}7o-42Ln*-Xo23HD zjlP+9w(7>)_}S$o4IaV_(Lucfa z>}KPI;gE=k*lM+l6p10e%E^!fw>nI|-Zo=bDX0+tdzL4*!=KDvx;zyM+;c}=vR1d% clK&N80Amto2F(2*Pyhe`07*qoM6N<$f&kJ*qyPW_ literal 0 HcmV?d00001