18 lines
10 KiB
JavaScript
18 lines
10 KiB
JavaScript
|
/*!
|
||
|
|
||
|
=========================================================
|
||
|
* Argon Dashboard - v1.0.0
|
||
|
=========================================================
|
||
|
|
||
|
* Product Page: https://www.creative-tim.com/product/argon-dashboard
|
||
|
* Copyright 2018 Creative Tim (https://www.creative-tim.com)
|
||
|
* Licensed under MIT (https://github.com/creativetimofficial/argon-dashboard/blob/master/LICENSE.md)
|
||
|
|
||
|
* 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.
|
||
|
|
||
|
*/
|
||
|
"use strict";var map,lat,lng,Datepicker=function(){var a=$(".datepicker");a.length&&a.each(function(){$(this).datepicker({disableTouchKeyboard:!0,autoclose:!1})})}(),CopyIcon=function(){var a,e=".btn-icon-clipboard",t=$(e);t.length&&((a=t).tooltip().on("mouseleave",function(){a.tooltip("hide")}),new ClipboardJS(e).on("success",function(a){$(a.trigger).attr("title","Copied!").tooltip("_fixTitle").tooltip("show").attr("title","Copy to clipboard").tooltip("_fixTitle"),a.clearSelection()}))}(),FormControl=function(){var a=$(".form-control");a.length&&a.on("focus blur",function(a){$(this).parents(".form-group").toggleClass("focused","focus"===a.type||0<this.value.length)}).trigger("blur")}(),$map=$("#map-canvas"),color="#5e72e4";function initMap(){map=document.getElementById("map-canvas"),lat=map.getAttribute("data-lat"),lng=map.getAttribute("data-lng");var a=new google.maps.LatLng(lat,lng),e={zoom:12,scrollwheel:!1,center:a,mapTypeId:google.maps.MapTypeId.ROADMAP,styles:[{featureType:"administrative",elementType:"labels.text.fill",stylers:[{color:"#444444"}]},{featureType:"landscape",elementType:"all",stylers:[{color:"#f2f2f2"}]},{featureType:"poi",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"all",stylers:[{saturation:-100},{lightness:45}]},{featureType:"road.highway",elementType:"all",stylers:[{visibility:"simplified"}]},{featureType:"road.arterial",elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"transit",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"water",elementType:"all",stylers:[{color:color},{visibility:"on"}]}]};map=new google.maps.Map(map,e);var t=new google.maps.Marker({position:a,map:map,animation:google.maps.Animation.DROP,title:"Hello World!"}),o=new google.maps.InfoWindow({content:'<div class="info-window-content"><h2>Argon Dashboard</h2><p>A beautiful Dashboard for Bootstrap 4. It is Free and Open Source.</p></div>'});google.maps.event.addListener(t,"click",function(){o.open(map,t)})}$map.length&&google.maps.event.addDomListener(window,"load",initMap);var Navbar=function(){var e=$(".navbar-nav, .navbar-nav .nav"),t=$(".navbar .collapse"),a=$(".navbar .dropdown");t.on({"show.bs.collapse":function(){var a;(a=$(this)).closest(e).find(t).not(a).collapse("hide")}}),a.on({"hide.bs.dropdown":function(){var a,e;a=$(this),(e=a.find(".dropdown-menu")).addClass("close"),setTimeout(function(){e.removeClass("close")},200)}})}(),NavbarCollapse=function(){$(".navbar-nav");var a=$(".navbar .collapse");a.length&&(a.on({"hide.bs.collapse":function(){a.addClass("collapsing-out")}}),a.on({"hidden.bs.collapse":function(){a.removeClass("collapsing-out")}}))}(),noUiSlider=function(){if($(".input-slider-container")[0]&&$(".input-slider-container").each(function(){var a=$(this).find(".input-slider"),e=a.attr("id"),t=a.data("range-value-min"),o=a.data("range-value-max"),n=$(this).find(".range-slider-value"),r=n.attr("id"),l=n.data("range-value-low"),i=document.getElementById(e),s=document.getElementById(r);noUiSlider.create(i,{start:[parseInt(l)],connect:[!0,!1],range:{min:[parseInt(t)],max:[parseInt(o)]}}),i.noUiSlider.on("update",function(a,e){s.textContent=a[e]})}),$("#input-slider-range")[0]){var a=document.getElementById("input-slider-range"),e=document.getElementById("input-slider-range-value-low"),t=document.getElementById("input-slider-range-value-high"),o=[e,t];noUiSlider.create(a,{start:[parseInt(e.getAttribute("data-range-value-low")),parseInt(t.getAttribute("data-range-value-high"))],connect:!0,range:{min:parseInt(a.getAttribute("data-range-value-min")),max:parseInt(a.getAttribute("data-range-value-max"))}}),a.noUiSlider.on("update",function(a,e){o[e].textContent=a[e]})}}(),Popover=function(){var a=$('[data-toggle="popover"]'),t="";a.length&&a.each(function(){!function(a){a.data("color")&&(t="popover-"+a.data("color"));var e={trigger:"focus",template:'<div class="popover '+t+'" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'};a.popover(e)}($(this))})}(),ScrollTo=function(){var a=$(".scro
|