29
0
mirror of https://github.com/joomla/joomla-cms.git synced 2024-08-24 20:19:48 +00:00

^+ [#29896] Switch JHtmlIcons to render with JLayout, update quickicons

module to suit. Thanks Michael.
This commit is contained in:
Michael Babker 2013-02-08 19:18:34 +01:00 committed by Jean-Marie Simonet
parent c8d87080a2
commit 299ccf6db1
14 changed files with 99 additions and 21 deletions

View File

@ -51,72 +51,84 @@ abstract class modQuickIconHelper
array( array(
'link' => JRoute::_('index.php?option=com_content&task=article.add'), 'link' => JRoute::_('index.php?option=com_content&task=article.add'),
'image' => 'file-add', 'image' => 'file-add',
'icon' => 'header/icon-48-article-add.png',
'text' => JText::_('MOD_QUICKICON_ADD_NEW_ARTICLE'), 'text' => JText::_('MOD_QUICKICON_ADD_NEW_ARTICLE'),
'access' => array('core.manage', 'com_content', 'core.create', 'com_content', ) 'access' => array('core.manage', 'com_content', 'core.create', 'com_content', )
), ),
array( array(
'link' => JRoute::_('index.php?option=com_content'), 'link' => JRoute::_('index.php?option=com_content'),
'image' => 'pencil-2', 'image' => 'pencil-2',
'icon' => 'header/icon-48-article.png',
'text' => JText::_('MOD_QUICKICON_ARTICLE_MANAGER'), 'text' => JText::_('MOD_QUICKICON_ARTICLE_MANAGER'),
'access' => array('core.manage', 'com_content') 'access' => array('core.manage', 'com_content')
), ),
array( array(
'link' => JRoute::_('index.php?option=com_categories&extension=com_content'), 'link' => JRoute::_('index.php?option=com_categories&extension=com_content'),
'image' => 'folder', 'image' => 'folder',
'icon' => 'header/icon-48-category.png',
'text' => JText::_('MOD_QUICKICON_CATEGORY_MANAGER'), 'text' => JText::_('MOD_QUICKICON_CATEGORY_MANAGER'),
'access' => array('core.manage', 'com_content') 'access' => array('core.manage', 'com_content')
), ),
array( array(
'link' => JRoute::_('index.php?option=com_media'), 'link' => JRoute::_('index.php?option=com_media'),
'image' => 'pictures', 'image' => 'pictures',
'icon' => 'header/icon-48-media.png',
'text' => JText::_('MOD_QUICKICON_MEDIA_MANAGER'), 'text' => JText::_('MOD_QUICKICON_MEDIA_MANAGER'),
'access' => array('core.manage', 'com_media') 'access' => array('core.manage', 'com_media')
), ),
array( array(
'link' => JRoute::_('index.php?option=com_menus'), 'link' => JRoute::_('index.php?option=com_menus'),
'image' => 'list-view', 'image' => 'list-view',
'icon' => 'header/icon-48-menumgr.png',
'text' => JText::_('MOD_QUICKICON_MENU_MANAGER'), 'text' => JText::_('MOD_QUICKICON_MENU_MANAGER'),
'access' => array('core.manage', 'com_menus') 'access' => array('core.manage', 'com_menus')
), ),
array( array(
'link' => JRoute::_('index.php?option=com_users'), 'link' => JRoute::_('index.php?option=com_users'),
'image' => 'address', 'image' => 'address',
'icon' => 'header/icon-48-user.png',
'text' => JText::_('MOD_QUICKICON_USER_MANAGER'), 'text' => JText::_('MOD_QUICKICON_USER_MANAGER'),
'access' => array('core.manage', 'com_users') 'access' => array('core.manage', 'com_users')
), ),
array( array(
'link' => JRoute::_('index.php?option=com_modules'), 'link' => JRoute::_('index.php?option=com_modules'),
'image' => 'cube', 'image' => 'cube',
'icon' => 'header/icon-48-module.png',
'text' => JText::_('MOD_QUICKICON_MODULE_MANAGER'), 'text' => JText::_('MOD_QUICKICON_MODULE_MANAGER'),
'access' => array('core.manage', 'com_modules') 'access' => array('core.manage', 'com_modules')
), ),
array( array(
'link' => JRoute::_('index.php?option=com_installer'), 'link' => JRoute::_('index.php?option=com_installer'),
'image' => 'puzzle', 'image' => 'puzzle',
'icon' => 'header/icon-48-extension.png',
'text' => JText::_('MOD_QUICKICON_EXTENSION_MANAGER'), 'text' => JText::_('MOD_QUICKICON_EXTENSION_MANAGER'),
'access' => array('core.manage', 'com_installer') 'access' => array('core.manage', 'com_installer')
), ),
array( array(
'link' => JRoute::_('index.php?option=com_languages'), 'link' => JRoute::_('index.php?option=com_languages'),
'image' => 'comments-2', 'image' => 'comments-2',
'icon' => 'header/icon-48-language.png',
'text' => JText::_('MOD_QUICKICON_LANGUAGE_MANAGER'), 'text' => JText::_('MOD_QUICKICON_LANGUAGE_MANAGER'),
'access' => array('core.manage', 'com_languages') 'access' => array('core.manage', 'com_languages')
), ),
array( array(
'link' => JRoute::_('index.php?option=com_config'), 'link' => JRoute::_('index.php?option=com_config'),
'image' => 'cog', 'image' => 'cog',
'icon' => 'header/icon-48-config.png',
'text' => JText::_('MOD_QUICKICON_GLOBAL_CONFIGURATION'), 'text' => JText::_('MOD_QUICKICON_GLOBAL_CONFIGURATION'),
'access' => array('core.manage', 'com_config', 'core.admin', 'com_config') 'access' => array('core.manage', 'com_config', 'core.admin', 'com_config')
), ),
array( array(
'link' => JRoute::_('index.php?option=com_templates'), 'link' => JRoute::_('index.php?option=com_templates'),
'image' => 'eye', 'image' => 'eye',
'icon' => 'header/icon-48-themes.png',
'text' => JText::_('MOD_QUICKICON_TEMPLATE_MANAGER'), 'text' => JText::_('MOD_QUICKICON_TEMPLATE_MANAGER'),
'access' => array('core.manage', 'com_templates') 'access' => array('core.manage', 'com_templates')
), ),
array( array(
'link' => JRoute::_('index.php?option=com_admin&task=profile.edit&id='.JFactory::getUser()->id), 'link' => JRoute::_('index.php?option=com_admin&task=profile.edit&id='.JFactory::getUser()->id),
'image' => 'vcard', 'image' => 'vcard',
'icon' => 'header/icon-48-user-profile.png',
'text' => JText::_('MOD_QUICKICON_PROFILE'), 'text' => JText::_('MOD_QUICKICON_PROFILE'),
'access' => true 'access' => true
), ),

View File

@ -158,7 +158,7 @@ else
<div class="adminform"> <div class="adminform">
<!-- Display the Quick Icon Shortcuts --> <!-- Display the Quick Icon Shortcuts -->
<div class="cpanel-icons well"> <div class="cpanel-icons">
<?php if ($this->countModules('icon') > 1):?> <?php if ($this->countModules('icon') > 1):?>
<?php echo JHtml::_('sliders.start', 'position-icon', array('useCookie' => 1));?> <?php echo JHtml::_('sliders.start', 'position-icon', array('useCookie' => 1));?>
<jdoc:include type="modules" name="icon" /> <jdoc:include type="modules" name="icon" />

View File

@ -925,10 +925,10 @@ h3.pane-toggler a:focus {
.pane-slider.pane-hide { .pane-slider.pane-hide {
display: none; display: none;
} }
div#position-icon.pane-sliders div.pane-down div.icon-wrapper { div#position-icon.pane-sliders div.pane-down div.quickicon-wrapper {
margin: 5px 0 5px 0; margin: 5px 0 5px 0;
} }
div#position-icon.pane-sliders div.pane-down .icon-wrapper .icon { div#position-icon.pane-sliders div.pane-down .quickicon-wrapper .icon {
padding: 5px 0 5px 10px; padding: 5px 0 5px 10px;
margin: 0; margin: 0;
} }
@ -1162,10 +1162,11 @@ p.tab-description {
text-align: center; text-align: center;
} }
div.cpanel-icons { div.cpanel-icons {
width: 54%;
float: left; float: left;
} }
div.cpanel-component { div.cpanel-component {
width: 75%; width: 45%;
float: right; float: right;
} }
div.col { div.col {

View File

@ -0,0 +1,26 @@
<?php
/**
* @package Joomla.Administrator
* @subpackage Template.hathor
*
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
$id = empty($displayData['id']) ? '' : (' id="' . $displayData['id'] . '"');
$target = empty($displayData['target']) ? '' : (' target="' . $displayData['target'] . '"');
$onclick = empty($displayData['onclick']) ? '' : (' onclick="' . $displayData['onclick'] . '"');
$title = empty($displayData['title']) ? '' : (' title="' . $this->escape($displayData['title']) . '"');
$text = empty($displayData['text']) ? '' : ('<span>' . $displayData['text'] . '</span>')
?>
<div class="quickicon-wrapper"<?php echo $id; ?>>
<div class="icon">
<a href="<?php echo $displayData['link']; ?>"<?php echo $target . $onclick . $title; ?>>
<?php echo JHtml::_('image', empty($displayData['icon']) ? '' : $displayData['icon'], empty($displayData['alt']) ? null : htmlspecialchars($displayData['alt']), null, true); ?>
<?php echo $text; ?>
</a>
</div>
</div>

View File

@ -0,0 +1 @@
<!DOCTYPE html><title></title>

View File

@ -0,0 +1,18 @@
<?php
/**
* @package Joomla.Administrator
* @subpackage mod_quickicon
*
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
$html = JHtml::_('icons.buttons', $buttons);
?>
<?php if (!empty($html)): ?>
<div class="cpanel">
<?php echo $html;?>
</div>
<?php endif;?>

View File

@ -0,0 +1 @@
<!DOCTYPE html><title></title>

View File

@ -503,11 +503,11 @@ h3.pane-toggler a:focus {
display: none; display: none;
} }
div#position-icon.pane-sliders div.pane-down div.icon-wrapper { div#position-icon.pane-sliders div.pane-down div.quickicon-wrapper {
margin: 5px 0 5px 0; margin: 5px 0 5px 0;
} }
div#position-icon.pane-sliders div.pane-down .icon-wrapper .icon { div#position-icon.pane-sliders div.pane-down .quickicon-wrapper .icon {
padding: 5px 0 5px 10px; padding: 5px 0 5px 10px;
margin: 0; margin: 0;
} }
@ -796,11 +796,12 @@ p.tab-description {
} }
div.cpanel-icons { div.cpanel-icons {
width: 54%;
float: left; float: left;
} }
div.cpanel-component { div.cpanel-component {
width: 75%; width: 45%;
float: right; float: right;
} }

View File

@ -31,7 +31,7 @@ $ -> Language fix or change
# [#29737] If a user is blocked while logged in, he or she stays logged in. Thanks Alexander # [#29737] If a user is blocked while logged in, he or she stays logged in. Thanks Alexander
# [#29736] Bootstrap carousel undefined method JHtmlBootstrap::_getJSObject in bootstrap.php. Thanks Michael and Robert. # [#29736] Bootstrap carousel undefined method JHtmlBootstrap::_getJSObject in bootstrap.php. Thanks Michael and Robert.
# [#30063] Disabled template positions shown in module available positions. Thanks Roberto # [#30063] Disabled template positions shown in module available positions. Thanks Roberto
#$ [#30079] * Improving cookie handling in languagefilter plugin ^+ [#29896] Switch JHtmlIcons to render with JLayout, update quickicons module to suit. Thanks Michael.
06-February-2013 Jean-Marie Simonet 06-February-2013 Jean-Marie Simonet
# [#29965] Add pagination in COM_SEARCH component # [#29965] Add pagination in COM_SEARCH component

View File

@ -0,0 +1,25 @@
<?php
/**
* @package Joomla.Site
* @subpackage Layout
*
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
$id = empty($displayData['id']) ? '' : (' id="' . $displayData['id'] . '"');
$target = empty($displayData['target']) ? '' : (' target="' . $displayData['target'] . '"');
$onclick = empty($displayData['onclick']) ? '' : (' onclick="' . $displayData['onclick'] . '"');
$title = empty($displayData['title']) ? '' : (' title="' . $this->escape($displayData['title']) . '"');
$text = empty($displayData['text']) ? '' : ('<span>' . $displayData['text'] . '</span>')
?>
<div class="row-fluid"<?php echo $id; ?>>
<div class="span12">
<a href="<?php echo $displayData['link']; ?>"<?php echo $target . $onclick . $title; ?>>
<i class="icon-<?php echo $displayData['image']; ?>"></i> <?php echo $text; ?>
</a>
</div>
</div>

View File

@ -0,0 +1 @@
<!DOCTYPE html><title></title>

View File

@ -72,18 +72,8 @@ abstract class JHtmlIcons
} }
} }
$html[] = '<div class="row-fluid"' . (empty($button['id']) ? '' : (' id="' . $button['id'] . '"')) . '>'; // Instantiate a new JLayoutFile instance and render the layout
$html[] = '<div class="span12">'; $layout = new JLayoutFile('joomla.quickicons.icon');
$html[] = '<a href="' . $button['link'] . '"'; return $layout->render($button);
$html[] = (empty($button['target']) ? '' : (' target="' . $button['target'] . '"'));
$html[] = (empty($button['onclick']) ? '' : (' onclick="' . $button['onclick'] . '"'));
$html[] = (empty($button['title']) ? '' : (' title="' . htmlspecialchars($button['title']) . '"'));
$html[] = '>';
$html[] = '<i class="icon-' . $button['image'] . '"></i> ';
$html[] = (empty($button['text'])) ? '' : ('<span>' . $button['text'] . '</span>');
$html[] = '</a>';
$html[] = '</div>';
$html[] = '</div>';
return implode($html);
} }
} }

View File

@ -65,6 +65,7 @@ class plgQuickiconExtensionupdate extends JPlugin
return array(array( return array(array(
'link' => 'index.php?option=com_installer&view=update', 'link' => 'index.php?option=com_installer&view=update',
'image' => 'asterisk', 'image' => 'asterisk',
'icon' => 'header/icon-48-extension.png',
'text' => JText::_('PLG_QUICKICON_EXTENSIONUPDATE_CHECKING'), 'text' => JText::_('PLG_QUICKICON_EXTENSIONUPDATE_CHECKING'),
'id' => 'plg_quickicon_extensionupdate' 'id' => 'plg_quickicon_extensionupdate'
)); ));

View File

@ -72,6 +72,7 @@ class plgQuickiconJoomlaupdate extends JPlugin
return array(array( return array(array(
'link' => 'index.php?option=com_joomlaupdate', 'link' => 'index.php?option=com_joomlaupdate',
'image' => 'download', 'image' => 'download',
'icon' => 'header/icon-48-download.png',
'text' => JText::_('PLG_QUICKICON_JOOMLAUPDATE_CHECKING'), 'text' => JText::_('PLG_QUICKICON_JOOMLAUPDATE_CHECKING'),
'id' => 'plg_quickicon_joomlaupdate' 'id' => 'plg_quickicon_joomlaupdate'
)); ));