- md5
- b40d7fbfa4389d0e18c4a75aa58cac73
- sha1
- ec518f6b7e3a92f193a96908aa62fd3f8deb2b81
- sha256
- c7b39d63d6f164224a8503c6890cb8427d2f87e938f56ac9c7a3d511cd13728a
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
<?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\LayoutHelper;
HTMLHelper::_('behavior.core');
// Add strings for translations in Javascript.
Text::script('JGLOBAL_EXPAND_CATEGORIES');
Text::script('JGLOBAL_COLLAPSE_CATEGORIES');
$js = <<<JS
(function() {
document.addEventListener('DOMContentLoaded', function() {
var categories = [].slice.call(document.querySelectorAll('.categories-list'));
categories.forEach(function(category) {
var buttons = [].slice.call(document.querySelectorAll('.categories-list'));
buttons.forEach(function(button) {
var span = button.querySelector('span');
if(span) {
span.classList.toggle('icon-plus')
span.classList.toggle('icon-minus')
}
if (button.getAttribute('aria-label') === Joomla.JText._('JGLOBAL_EXPAND_CATEGORIES'))
{
button.setAttribute('aria-label', Joomla.JText._('JGLOBAL_COLLAPSE_CATEGORIES'));
} else {
button.setAttribute('aria-label', Joomla.JText._('JGLOBAL_EXPAND_CATEGORIES'));
}
})
})
});
})();
JS;
// @todo move script to a file
$this->document->addScriptDeclaration($js);
?>
<div class="com-content-categories categories-list">
<?php
echo LayoutHelper::render('joomla.content.categories_default', $this);
echo $this->loadTemplate('items');
?>
</div>
No other release has this exact content. See every version of this file.