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.
6 lines
6.5 KiB
6 lines
6.5 KiB
6 years ago
|
/*!
|
||
|
* stack-admin-theme (https://pixinvent.com/bootstrap-admin-template/stack)
|
||
|
* Copyright 2018 PIXINVENT
|
||
|
* Licensed under the Themeforest Standard Licenses
|
||
|
*/
|
||
|
!function(window,document,$){"use strict";var $html=$("html"),$body=$("body");$(window).on("load",function(){function setContentMenuHeight(){var menuHeight=$(".main-menu").height(),bodyHeight=$(".content-body").height();bodyHeight<menuHeight&&$(".content-body").css("height",menuHeight)}var rtl,compactMenu=!1;"rtl"==$("html").data("textdirection")&&(rtl=!0),setTimeout(function(){$html.removeClass("loading").addClass("loaded")},1200),$.app.menu.init(compactMenu);var config={speed:300};$.app.nav.initialized===!1&&$.app.nav.init(config),Unison.on("change",function(bp){$.app.menu.change()}),$('[data-toggle="tooltip"]').tooltip({container:"body"}),$(".navbar-hide-on-scroll").length>0&&($(".navbar-hide-on-scroll.fixed-top").headroom({offset:205,tolerance:5,classes:{initial:"headroom",pinned:"headroom--pinned-top",unpinned:"headroom--unpinned-top"}}),$(".navbar-hide-on-scroll.fixed-bottom").headroom({offset:205,tolerance:5,classes:{initial:"headroom",pinned:"headroom--pinned-bottom",unpinned:"headroom--unpinned-bottom"}})),setTimeout(function(){$("body").hasClass("vertical-content-menu")&&setContentMenuHeight()},500),$('a[data-action="collapse"]').on("click",function(e){e.preventDefault(),$(this).closest(".card").children(".card-content").collapse("toggle"),$(this).closest(".card").find('[data-action="collapse"] i').toggleClass("ft-minus ft-plus")}),$('a[data-action="expand"]').on("click",function(e){e.preventDefault(),$(this).closest(".card").find('[data-action="expand"] i').toggleClass("ft-maximize ft-minimize"),$(this).closest(".card").toggleClass("card-fullscreen")}),$(".scrollable-container").length>0&&$(".scrollable-container").perfectScrollbar({theme:"dark"}),$('a[data-action="reload"]').on("click",function(){var block_ele=$(this).closest(".card");block_ele.block({message:'<div class="ft-refresh-cw icon-spin font-medium-2"></div>',timeout:2e3,overlayCSS:{backgroundColor:"#FFF",cursor:"wait"},css:{border:0,padding:0,backgroundColor:"none"}})}),$('a[data-action="close"]').on("click",function(){$(this).closest(".card").removeClass().slideUp("fast")}),setTimeout(function(){$(".row.match-height").each(function(){$(this).find(".card").not(".card .card").matchHeight()})},500),$('.card .heading-elements a[data-action="collapse"]').on("click",function(){var cardHeight,$this=$(this),card=$this.closest(".card");parseInt(card[0].style.height,10)>0?(cardHeight=card.css("height"),card.css("height","").attr("data-height",cardHeight)):card.data("height")&&(cardHeight=card.data("height"),card.css("height",cardHeight).attr("data-height",""))});var menuType=$body.data("menu");"vertical-compact-menu"!=menuType&&"horizontal-menu"!=menuType&&compactMenu===!1&&("vertical-menu-modern"==$body.data("menu")?"true"===localStorage.getItem("menuLocked")&&$(".main-menu-content").find("li.active").parents("li").addClass("open"):$(".main-menu-content").find("li.active").parents("li").addClass("open")),"vertical-compact-menu"!=menuType&&"horizontal-menu"!=menuType||($(".main-menu-content").find("li.active").parents("li:not(.nav-item)").addClass("open"),$(".main-menu-content").find("li.active").parents("li").addClass("active")),$(".heading-elements-toggle").on("click",function(){$(this).parent().children(".heading-elements").toggleClass("visible")});var chartjsDiv=$(".chartjs"),canvasHeight=chartjsDiv.children("canvas").attr("height");if(chartjsDiv.css("height",canvasHeight),$body.hasClass("boxed-layout")&&($body.hasClass("vertical-overlay-menu")||$body.hasClass("vertical-compact-menu"))){var menuWidth=$(".main-menu").width(),contentPosition=$(".app-content").position().left,menuPositionAdjust=contentPosition-menuWidth;$body.hasClass("menu-flipped")?$(".main-menu").css("right",menuPositionAdjust+"px"):$(".main-menu").css("left",menuPositionAdjust+"px")}$(".nav-link-search").on("click",function(){var searchInput=($(this),$(this).siblings(".search-input"));searchInput.hasClass("open")?searchInput.removeClass("open"):searchInput.addClass("open")})}),$(document).on("click",".menu-toggle, .modern-nav-toggle",function(e){return e.preventDefault(),$.app.menu.tog
|