diff --git a/Web/Resgrid.Web/wwwroot/js/site.js b/Web/Resgrid.Web/wwwroot/js/site.js index b49be1f6..8122414d 100644 --- a/Web/Resgrid.Web/wwwroot/js/site.js +++ b/Web/Resgrid.Web/wwwroot/js/site.js @@ -1,4 +1,10 @@ -$(document).ready(function () { +// Bundled react-elements.css inlines the Leaflet marker as a data URI, which breaks +// L.Icon.Default's CSS path detection. Pin the image path explicitly. +if (typeof L !== 'undefined' && L.Icon && L.Icon.Default) { + L.Icon.Default.imagePath = '/lib/leaflet/dist/images/'; +} + +$(document).ready(function () { // Add body-small class if window less than 768px diff --git a/Web/Resgrid.Web/wwwroot/js/site.min.js b/Web/Resgrid.Web/wwwroot/js/site.min.js index 6698ec20..82436761 100644 --- a/Web/Resgrid.Web/wwwroot/js/site.min.js +++ b/Web/Resgrid.Web/wwwroot/js/site.min.js @@ -1,2 +1,2 @@ -function localStorageSupport(){return"localStorage"in window&&window.localStorage!==null}function SmoothlyMenu(){!$("body").hasClass("mini-navbar")||$("body").hasClass("body-small")?($("#side-menu").hide(),setTimeout(function(){$("#side-menu").fadeIn(400)},200)):$("body").hasClass("fixed-sidebar")?($("#side-menu").hide(),setTimeout(function(){$("#side-menu").fadeIn(400)},100)):$("#side-menu").removeAttr("style")}function WinMove(){$("[class*=col]").sortable({handle:".ibox-title",connectWith:"[class*=col]",tolerance:"pointer",forcePlaceholderSize:!0,opacity:.8}).disableSelection()}$(document).ready(function(){function n(){var i=$("body > #wrapper").height()-61,n,t;$(".sidebard-panel").css("min-height",i+"px");n=$("nav.navbar-default").height();t=$("#page-wrapper").height();n>t&&$("#page-wrapper").css("min-height",n+"px");n0&&!$("body").hasClass("fixed-nav")?$("#right-sidebar").addClass("sidebar-top"):$("#right-sidebar").removeClass("sidebar-top")});$(window).bind("load resize scroll",function(){$("body").hasClass("body-small")||n()});$("[data-toggle=popover]").popover();$(".full-height-scroll").slimscroll({height:"100%"})});$(window).bind("resize",function(){$(this).width()<769?$("body").addClass("body-small"):$("body").removeClass("body-small")});$(document).ready(function(){if(localStorageSupport()){var t=localStorage.getItem("collapse_menu"),i=localStorage.getItem("fixedsidebar"),r=localStorage.getItem("fixednavbar"),u=localStorage.getItem("boxedlayout"),f=localStorage.getItem("fixedfooter"),n=$("body");i=="on"&&(n.addClass("fixed-sidebar"),$(".sidebar-collapse").slimScroll({height:"100%",railOpacity:.9}));t=="on"&&(n.hasClass("fixed-sidebar")?n.hasClass("body-small")||n.addClass("mini-navbar"):n.hasClass("body-small")||n.addClass("mini-navbar"));r=="on"&&($(".navbar-static-top").removeClass("navbar-static-top").addClass("navbar-fixed-top"),n.addClass("fixed-nav"));u=="on"&&n.addClass("boxed-layout");f=="on"&&$(".footer").addClass("fixed")}}); +typeof L!="undefined"&&L.Icon&&L.Icon.Default&&(L.Icon.Default.imagePath="/lib/leaflet/dist/images/");function localStorageSupport(){return"localStorage"in window&&window.localStorage!==null}function SmoothlyMenu(){!$("body").hasClass("mini-navbar")||$("body").hasClass("body-small")?($("#side-menu").hide(),setTimeout(function(){$("#side-menu").fadeIn(400)},200)):$("body").hasClass("fixed-sidebar")?($("#side-menu").hide(),setTimeout(function(){$("#side-menu").fadeIn(400)},100)):$("#side-menu").removeAttr("style")}function WinMove(){$("[class*=col]").sortable({handle:".ibox-title",connectWith:"[class*=col]",tolerance:"pointer",forcePlaceholderSize:!0,opacity:.8}).disableSelection()}$(document).ready(function(){function n(){var i=$("body > #wrapper").height()-61,n,t;$(".sidebard-panel").css("min-height",i+"px");n=$("nav.navbar-default").height();t=$("#page-wrapper").height();n>t&&$("#page-wrapper").css("min-height",n+"px");n0&&!$("body").hasClass("fixed-nav")?$("#right-sidebar").addClass("sidebar-top"):$("#right-sidebar").removeClass("sidebar-top")});$(window).bind("load resize scroll",function(){$("body").hasClass("body-small")||n()});$("[data-toggle=popover]").popover();$(".full-height-scroll").slimscroll({height:"100%"})});$(window).bind("resize",function(){$(this).width()<769?$("body").addClass("body-small"):$("body").removeClass("body-small")});$(document).ready(function(){if(localStorageSupport()){var t=localStorage.getItem("collapse_menu"),i=localStorage.getItem("fixedsidebar"),r=localStorage.getItem("fixednavbar"),u=localStorage.getItem("boxedlayout"),f=localStorage.getItem("fixedfooter"),n=$("body");i=="on"&&(n.addClass("fixed-sidebar"),$(".sidebar-collapse").slimScroll({height:"100%",railOpacity:.9}));t=="on"&&(n.hasClass("fixed-sidebar")?n.hasClass("body-small")||n.addClass("mini-navbar"):n.hasClass("body-small")||n.addClass("mini-navbar"));r=="on"&&($(".navbar-static-top").removeClass("navbar-static-top").addClass("navbar-fixed-top"),n.addClass("fixed-nav"));u=="on"&&n.addClass("boxed-layout");f=="on"&&$(".footer").addClass("fixed")}}); //# sourceMappingURL=site.min.js.map \ No newline at end of file