-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.min.js
7 lines (7 loc) · 3.32 KB
/
main.min.js
1
2
3
4
5
6
7
/*! --------------------------------------------------------------
# main.js
#
# Main theme js file for Options-admin template.
# This is compressed js file. You get uncompressed version with download.
--------------------------------------------------------------*/
$(function(e){"use strict";function n(n){var o=null,t=null,l=e(n),d=e(".dropdown-menu",n),c=l.parents("ul.nav");return c.size()>0&&(o=c.data("dropdown-in")||null,t=c.data("dropdown-out")||null),{target:n,dropdown:l,dropdownMenu:d,effectIn:d.data("dropdown-in")||o,effectOut:d.data("dropdown-out")||t}}function o(e,n){n&&(e.dropdown.addClass("dropdown-animating"),e.dropdownMenu.addClass("animated"),e.dropdownMenu.addClass(n))}function t(e,n){var o="webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend";e.dropdown.one(o,function(){e.dropdown.removeClass("dropdown-animating"),e.dropdownMenu.removeClass("animated"),e.dropdownMenu.removeClass(e.effectIn),e.dropdownMenu.removeClass(e.effectOut),"function"==typeof n&&n()})}e(".user-info-handle").on("click",function(n){n.preventDefault(),e(".user-info").toggleClass("closed")}),e(".small-nav-handle").on("click",function(n){n.preventDefault(),e(".left-sidebar").toggleClass("small-nav"),e(".navbar-header").toggleClass("small-nav-header")}),e(".mobile-nav-toggle").on("click",function(n){n.preventDefault(),e(".left-sidebar").toggle()}),e('[data-toggle="tooltip"]').tooltip(),e('[data-toggle="popover"]').popover(),e(".modal[data-backdrop-color]").on("show.bs.modal hide.bs.modal",function(){e("body").toggleClass("modal-color-"+e(this).data("backdropColor"))}),e(".open-right-sidebar").on("click",function(n){n.preventDefault(),e(".right-sidebar, .right-sidebar .sidebar-content").css("right","0px")}),e(".right-sidebar .close-icon").on("click",function(n){n.preventDefault(),e(".right-sidebar, .right-sidebar .sidebar-content").css("right","-400px")}),e("[data-panel-control]").lobiPanel(),e(".src-btn").hide(),e(".toggle-help-handle").on("click",function(n){n.preventDefault(),e(".src-btn").toggle()}),e(".src-code").hide(),e(".toggle-code-handle").on("click",function(n){n.preventDefault(),e(".src-code").toggle()}),e(".full-screen-handle").on("click",function(e){e.preventDefault(),document.fullScreenElement&&null!==document.fullScreenElement||!document.mozFullScreen&&!document.webkitIsFullScreen?document.documentElement.requestFullScreen?document.documentElement.requestFullScreen():document.documentElement.mozRequestFullScreen?document.documentElement.mozRequestFullScreen():document.documentElement.webkitRequestFullScreen&&document.documentElement.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT):document.cancelFullScreen?document.cancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()}),e(".has-children").not(".open").find(".child-nav").slideUp("100"),e(".has-children>a").on("click",function(n){n.preventDefault(),e(this).parent().toggleClass("open"),e(this).parent().find(".child-nav").slideToggle("500")});var l=e(".dropdown, .dropup");l.on({"show.bs.dropdown":function(){var e=n(this);o(e,e.effectIn)},"shown.bs.dropdown":function(){var e=n(this);e.effectIn&&e.effectOut&&t(e,function(){})},"hide.bs.dropdown":function(e){var l=n(this);l.effectOut&&(e.preventDefault(),o(l,l.effectOut),t(l,function(){l.dropdown.removeClass("open")}))}})});