Skip to content

Commit

Permalink
Usenamespaced classes for sidebars
Browse files Browse the repository at this point in the history
  • Loading branch information
C-Lodder committed Jan 2, 2018
1 parent 923e1e0 commit e3897f7
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions layouts/joomla/sidebars/submenu.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,19 @@

defined('JPATH_BASE') or die;

JHtml::_('jquery.framework');
JHtmlBehavior::core();
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;

JFactory::getDocument()->addScriptDeclaration('
jQuery(document).ready(function($)
{
if (window.toggleSidebar)
{
HTMLHelper::_('jquery.framework');
HTMLHelper::_('behavior.core');

Factory::getDocument()->addScriptDeclaration('
jQuery(document).ready(function($) {
if (window.toggleSidebar) {
toggleSidebar(true);
}
else
{
else {
$("#j-toggle-sidebar-header").css("display", "none");
$("#j-toggle-button-wrapper").css("display", "none");
}
Expand All @@ -43,7 +44,7 @@
<a class="nolink"><?php echo $item[0]; ?></a>
<?php else :
if ($item[1] !== '') : ?>
<a href="<?php echo JFilterOutput::ampReplace($item[1]); ?>"><?php echo $item[0]; ?></a>
<a href="<?php echo OutputFilter::ampReplace($item[1]); ?>"><?php echo $item[0]; ?></a>
<?php else : ?>
<?php echo $item[0]; ?>
<?php endif;
Expand All @@ -57,7 +58,7 @@
<?php endif; ?>
<?php if ($displayData->displayFilters) : ?>
<div class="filter-select hidden-sm-down">
<h4 class="page-header"><?php echo JText::_('JSEARCH_FILTER_LABEL'); ?></h4>
<h4 class="page-header"><?php echo Text::_('JSEARCH_FILTER_LABEL'); ?></h4>
<?php foreach ($displayData->filters as $filter) : ?>
<label for="<?php echo $filter['name']; ?>" class="sr-only"><?php echo $filter['label']; ?></label>
<select name="<?php echo $filter['name']; ?>" id="<?php echo $filter['name']; ?>" class="custom-select" onchange="this.form.submit()">
Expand Down

0 comments on commit e3897f7

Please sign in to comment.