myaac/templates/kathrine/menu.js.html.twig
slawkens 04d9ec9c94 * updated tinymce to the latest (4.7.0) version
* added option to uninstall plugin
* added option to require specified myaac or php version for plugins
* added links loaded from database to admin panel - for future plugins
* added few characters hooks
* fixed some kathrine template js bug when shop is disabled
2017-10-09 16:47:34 +02:00

33 lines
627 B
Twig

var list = new Array();
list[0] = 'news';
list[1] = 'account';
list[2] = 'community';
list[3] = 'library';
{% if config.gifts_system %}
list[4] = 'shops';
{% endif %}
function initMenu()
{
var length = list.length;
for(i = 0; i < length; i++)
{
if(list[i] == category)
{
document.getElementById(list[i]).className = 'tab-active';
document.getElementById(list[i] + "-submenu").style.display = 'block';
}
else
{
document.getElementById(list[i]).className = 'tab';
document.getElementById(list[i] + "-submenu").style.display = 'none';
}
}
}
function menuSwitch(cat)
{
category = cat;
initMenu();
}