Skip to content

Commit

Permalink
CRM-12096 fix quickicon image for j3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
lcdservices committed Mar 15, 2013
1 parent 6eb2fed commit 713b422
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
22 changes: 20 additions & 2 deletions admin/plugins/civicrmicon/civicrmicon.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

1 change: 1 addition & 0 deletions admin/plugins/civicrmicon/civicrmicon.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@
<files>
<filename plugin="civicrmicon">civicrmicon.php</filename>
<filename>index.html</filename>
<filename>smallLogo14.png</filename>
</files>
</extension>
Binary file added admin/plugins/civicrmicon/smallLogo14.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 713b422

Please sign in to comment.