You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
7.7 KiB

1 year ago
!function(e,a,i){"use strict";i(a).ready(function(){function n(e,a){e.children(".submenu-content").show().slideUp(200,function(){i(this).css("display",""),i(this).find(".menu-item").removeClass("is-shown"),e.removeClass("open"),a&&a()})}var t=i(".app-sidebar"),s=i(".sidebar-content"),l=i(".wrapper"),o=a.querySelector(".sidebar-content");new PerfectScrollbar(o,{wheelSpeed:10,wheelPropagation:!0,minScrollbarLength:5}),s.on("click",".navigation-main .nav-item a",function(){var e=i(this).parent(".nav-item");if(e.hasClass("has-sub")&&e.hasClass("open"))n(e);else{if(e.hasClass("has-sub")&&function(e,a){var n=e.children(".submenu-content"),t=n.children(".menu-item").addClass("is-hidden");e.addClass("open"),n.hide().slideDown(200,function(){i(this).css("display","")}),setTimeout(function(){t.addClass("is-shown"),t.removeClass("is-hidden")},0)}(e),s.data("collapsible"))return!1;n(e.siblings(".open")),e.siblings(".open").find(".nav-item.open").removeClass("open")}}),i(".nav-toggle").on("click",function(){var e=i(this).find(".toggle-icon");"expanded"===e.attr("data-toggle")?(l.addClass("nav-collapsed"),i(".nav-toggle").find(".toggle-icon").removeClass("ik-toggle-right").addClass("ik-toggle-left"),e.attr("data-toggle","collapsed")):(l.removeClass("nav-collapsed menu-collapsed"),i(".nav-toggle").find(".toggle-icon").removeClass("ik-toggle-left").addClass("ik-toggle-right"),e.attr("data-toggle","expanded"))}),t.on("mouseenter",function(){if(l.hasClass("nav-collapsed")){l.removeClass("menu-collapsed");var e=i(".navigation-main .nav-item.nav-collapsed-open");e.children(".submenu-content").hide().slideDown(300,function(){i(this).css("display","")}),s.find(".nav-item.active").parents(".nav-item").addClass("open"),e.addClass("open").removeClass("nav-collapsed-open")}}).on("mouseleave",function(e){if(l.hasClass("nav-collapsed")){l.addClass("menu-collapsed");var a=i(".navigation-main .nav-item.open"),n=a.children(".submenu-content");a.addClass("nav-collapsed-open"),n.show().slideUp(300,function(){i(this).css("display","")}),a.removeClass("open")}}),i(e).width()<992&&(t.addClass("hide-sidebar"),l.removeClass("nav-collapsed menu-collapsed")),i(e).resize(function(){i(e).width()<992&&(t.addClass("hide-sidebar"),l.removeClass("nav-collapsed menu-collapsed")),i(e).width()>992&&(t.removeClass("hide-sidebar"),"collapsed"===i(".toggle-icon").attr("data-toggle")&&l.not(".nav-collapsed menu-collapsed")&&l.addClass("nav-collapsed menu-collapsed"))}),i(a).on("click",".navigation li:not(.has-sub)",function(){i(e).width()<992&&t.addClass("hide-sidebar")}),i(a).on("click",".logo-text",function(){i(e).width()<992&&t.addClass("hide-sidebar")}),i(".mobile-nav-toggle").on("click",function(e){e.stopPropagation(),t.toggleClass("hide-sidebar")}),i("html").on("click",function(a){i(e).width()<992&&(t.hasClass("hide-sidebar")||0!==t.has(a.target).length||t.addClass("hide-sidebar"))}),i("#sidebarClose").on("click",function(){t.addClass("hide-sidebar")}),i('[data-toggle="tooltip"]').tooltip(),i("#checkbox_select_all").on("click",function(){for(var e=a.getElementsByName("item_checkbox"),n=0;n<e.length;n++)"checkbox"==e[n].type&&(e[n].checked=!0),i(e).parent().parent().addClass("selected")}),i("#checkbox_deselect_all").on("click",function(){for(var e=a.getElementsByName("item_checkbox"),n=0;n<e.length;n++)"checkbox"==e[n].type&&(e[n].checked=!1),i(e).parent().parent().removeClass("selected")}),i("#quick-search").keyup(function(){var e=i(this).val().trim().toLowerCase();i(".app-item").hide().filter(function(){return-1!=i(this).html().trim().toLowerCase().indexOf(e)}).show()}),i(".list-item input:checkbox").change(function(){i(this).is(":checked")?i(this).parent().parent().addClass("selected"):i(this).parent().parent().removeClass("selected")}),i("#navbar-fullscreen").on("click",function(e){"undefined"!=typeof screenfull&&screenfull.enabled&&screenfull.toggle()}),i("#selectall").click(function(){i(this).is(":checked")?i(".select_all_child:checkbox").attr("checked",!0):i(".select_all_child:checkbox").attr("checked",!1)}),i(".list-item-wrap .list-item .list-title a").on("cl