Skip to content

Commit

Permalink
1. remove unecessry code
Browse files Browse the repository at this point in the history
2. Change the call of the JS file (name)
  • Loading branch information
ylahav committed Dec 30, 2018
1 parent 26989fa commit eebe57c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
13 changes: 0 additions & 13 deletions build/media_src/mod_menu/js/menu.es6.js
Expand Up @@ -37,19 +37,6 @@ function setupNavigation(nav) {
spanEl.addEventListener('mouseover', topLevelMouseOver(topLevelEl, settings));
spanEl.addEventListener('mouseout', topLevelMouseOut(topLevelEl, settings));
}
topLevelEl.querySelectorAll('ul').forEach((el) => {
el.setAttribute('data-test', 'true');
el.setAttribute('aria-hidden', 'true');
el.setAttribute('role', 'menu');
// Adding aria-haspopup for appropriate items
if (el.children.length > 0) {
el.parentElement.setAttribute('aria-haspopup', 'true');
}
el.querySelectorAll('li').forEach((liEl) => {
if (liEl.querySelector('a')) liEl.querySelector('a').tabIndex = '0';
if (liEl.querySelector('span')) liEl.querySelector('span').tabIndex = '0';
});
});

topLevelEl.addEventListener('mouseover', (event) => {
const curEl = event.target;
Expand Down
2 changes: 1 addition & 1 deletion modules/mod_menu/mod_menu.php
Expand Up @@ -13,7 +13,7 @@
use Joomla\CMS\Helper\ModuleHelper;
use Joomla\Module\Menu\Site\Helper\MenuHelper;

HTMLHelper::_('script', 'mod_menu/menu.js', array('version' => 'auto', 'relative' => true));
HTMLHelper::_('script', 'mod_menu/menu.es6.min.js', array('version' => 'auto', 'relative' => true));

$list = MenuHelper::getList($params);
$base = MenuHelper::getBase($params);
Expand Down

0 comments on commit eebe57c

Please sign in to comment.