芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/.trash/media.4/mod_menu/js/admin-menu-es5.min.js
!function(){"use strict";document.querySelectorAll("ul.main-nav").forEach((function(e){new MetisMenu(e)}));var e=document.getElementById("wrapper"),l=document.getElementById("sidebar-wrapper"),t=document.getElementById("menu-collapse-icon");if(l||e.classList.remove("closed"),l&&!l.getAttribute("data-hidden")){var c=document.getElementById("menu-collapse");[].slice.call(l.querySelectorAll(".collapse-level-1")).forEach((function(e){[].slice.call(e.querySelectorAll(".collapse-level-1")).forEach((function(e){e&&(e.classList.remove("collapse-level-1"),e.classList.add("collapse-level-2"))}))})),c.addEventListener("click",(function(l){l.preventDefault(),e.classList.toggle("closed"),t.classList.toggle("icon-toggle-on"),t.classList.toggle("icon-toggle-off"),[].slice.call(document.querySelectorAll(".main-nav > li")).forEach((function(e){e.classList.remove("open")}));var c=document.querySelector(".child-open");c&&c.classList.remove("child-open"),window.dispatchEvent(new CustomEvent("joomla:menu-toggle",{detail:e.classList.contains("closed")?"closed":"open",bubbles:!0,cancelable:!0}))}));var o=e.querySelectorAll("a.no-dropdown, a.collapse-arrow, .menu-dashboard > a"),s=window.location.href,a=document.querySelector("ul.main-nav"),n=[].slice.call(a.querySelectorAll("li.parent > a")),i=[].slice.call(a.querySelectorAll("li.parent .close"));o.forEach((function(e){if((!e.href.match(/index\.php$/)&&0===s.indexOf(e.href)||e.href.match(/index\.php$/)&&s.match(/index\.php$/))&&(e.setAttribute("aria-current","page"),e.classList.add("mm-active"),!e.parentNode.classList.contains("parent"))){var l=e.closest(".collapse-level-1"),t=e.closest(".collapse-level-2");l&&l.parentNode.classList.add("mm-active"),l&&l.classList.add("mm-show"),t&&t.parentNode.classList.add("mm-active"),t&&t.classList.add("mm-show")}}));var r=function(l){var c=l.currentTarget,o=c.parentNode;("span"===o.tagName.toLowerCase()&&(o=c.parentNode.parentNode),o.classList.contains("open"))?(a.classList.remove("child-open"),o.classList.remove("open")):([].slice.call(o.parentNode.children).forEach((function(e){e.classList.remove("open")})),e.classList.remove("closed"),t.classList.contains("icon-toggle-off")&&(t.classList.toggle("icon-toggle-off"),t.classList.toggle("icon-toggle-on")),a.classList.add("child-open"),o.parentNode.classList.contains("main-nav")&&o.classList.add("open"));window.dispatchEvent(new CustomEvent("joomla:menu-toggle",{detail:"open",bubbles:!0,cancelable:!0}))};n.forEach((function(e){e.addEventListener("click",r),e.addEventListener("keyup",r)})),i.forEach((function(e){e.addEventListener("click",(function(){[].slice.call(a.querySelectorAll(".open")).forEach((function(e){e.classList.remove("open")})),a.classList.remove("child-open")}))}))}}();