/*! ========================================================= * Material Dashboard Dark Edition - v2.1.0 ========================================================= * Product Page: https://www.creative-tim.com/product/material-dashboard-dark * Copyright 2018 Creative Tim (http://www.creative-tim.com) * Coded by www.creative-tim.com ========================================================= * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. */ (function() { isWindows = navigator.platform.indexOf('Win') > -1 ? true : false; if (isWindows) { // if we are on windows OS we activate the perfectScrollbar function $('.sidebar .sidebar-wrapper, .main-panel').perfectScrollbar(); $('html').addClass('perfect-scrollbar-on'); } else { $('html').addClass('perfect-scrollbar-off'); } })(); var breakCards = true; var searchVisible = 0; var transparent = true; var transparentDemo = true; var fixedTop = false; var mobile_menu_visible = 0, mobile_menu_initialized = false, toggle_initialized = false, bootstrap_nav_initialized = false; var seq = 0, delays = 80, durations = 500; var seq2 = 0, delays2 = 80, durations2 = 500; $(document).ready(function() { $('body').bootstrapMaterialDesign(); $sidebar = $('.sidebar'); md.initSidebarsCheck(); window_width = $(window).width(); // check if there is an image set for the sidebar's background md.checkSidebarImage(); // Activate bootstrap-select if ($(".selectpicker").length != 0) { $(".selectpicker").selectpicker(); } // Activate the tooltips $('[rel="tooltip"]').tooltip(); $('.form-control').on("focus", function() { $(this).parent('.input-group').addClass("input-group-focus"); }).on("blur", function() { $(this).parent(".input-group").removeClass("input-group-focus"); }); // remove class has-error for checkbox validation $('input[type="checkbox"][required="true"], input[type="radio"][required="true"]').on('click', function() { if ($(this).hasClass('error')) { $(this).closest('div').removeClass('has-error'); } }); }); $(document).on('click', '.navbar-toggler', function() { $toggle = $(this); if (mobile_menu_visible == 1) { $('html').removeClass('nav-open'); $('.close-layer').remove(); setTimeout(function() { $toggle.removeClass('toggled'); }, 400); mobile_menu_visible = 0; } else { setTimeout(function() { $toggle.addClass('toggled'); }, 430); var $layer = $('
'); if ($('body').find('.main-panel').length != 0) { $layer.appendTo(".main-panel"); } else if (($('body').hasClass('off-canvas-sidebar'))) { $layer.appendTo(".wrapper-full-page"); } setTimeout(function() { $layer.addClass('visible'); }, 100); $layer.click(function() { $('html').removeClass('nav-open'); mobile_menu_visible = 0; $layer.removeClass('visible'); setTimeout(function() { $layer.remove(); $toggle.removeClass('toggled'); }, 400); }); $('html').addClass('nav-open'); mobile_menu_visible = 1; } }); // activate collapse right menu when the windows is resized $(window).resize(function() { md.initSidebarsCheck(); // reset the seq for charts drawing animations seq = seq2 = 0; setTimeout(function() { md.initDashboardPageCharts(); }, 500); }); md = { misc: { navbar_menu_visible: 0, active_collapse: true, disabled_collapse_init: 0 }, checkSidebarImage: function() { $sidebar = $('.sidebar'); image_src = $sidebar.data('image'); if (image_src !== undefined) { sidebar_container = '