1"use strict"; 2 3var Dashboard = function () { 4 var global = { 5 tooltipOptions: { 6 placement: "right" 7 }, 8 menuClass: ".c-menu" 9 }; 10 11 var menuChangeActive = function menuChangeActive(el) { 12 var hasSubmenu = $(el).hasClass("has-submenu"); 13 $(global.menuClass + " .is-active").removeClass("is-active"); 14 $(el).addClass("is-active"); 15 // if (hasSubmenu) { 16 // $(el).find("ul").slideDown(); 17 // } 18 }; 19 20 var sidebarChangeWidth = function sidebarChangeWidth() { 21 var $menuItemsTitle = $("li .menu-item__title"); 22 $("body").toggleClass("sidebar-is-reduced sidebar-is-expanded"); 23 $(".hamburger-toggle").toggleClass("is-opened"); 24 25 if ($("body").hasClass("sidebar-is-expanded")) { 26 $('[data-toggle="tooltip"]').tooltip("destroy"); 27 } else { 28 $('[data-toggle="tooltip"]').tooltip(global.tooltipOptions); 29 } 30 }; 31 32 return { 33 init: function init() { 34 $(".js-hamburger").on("click", sidebarChangeWidth); 35 36 $(".js-menu li").on("click", function (e) { 37 menuChangeActive(e.currentTarget); 38 }); 39 40 $('[data-toggle="tooltip"]').tooltip(global.tooltipOptions); 41 } 42 }; 43}(); 44 45Dashboard.init(); 46//# sourceURL=pen.js
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.