X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/9b9e857b726d4a45af5e1b760ac1639cd31f0280..83043d6f1cd85729a3f91e5c73d78a39b8ae7d04:/app/assets/javascripts/index.js?ds=inline diff --git a/app/assets/javascripts/index.js b/app/assets/javascripts/index.js index 2b29992e9..56495b31a 100644 --- a/app/assets/javascripts/index.js +++ b/app/assets/javascripts/index.js @@ -25,8 +25,6 @@ //= require qs/dist/qs $(document).ready(function () { - var loaderTimeout; - var map = new L.OSM.Map("map", { zoomControl: false, layerControl: false, @@ -39,11 +37,7 @@ $(document).ready(function () { map.setSidebarOverlaid(false); - clearTimeout(loaderTimeout); - - loaderTimeout = setTimeout(function () { - $("#sidebar_loader").show(); - }, 200); + $("#sidebar_loader").show().addClass("delayed-fade-in"); // IE<10 doesn't respect Vary: X-Requested-With header, so // prevent caching the XHR response as a full-page URL. @@ -60,9 +54,8 @@ $(document).ready(function () { url: content_path, dataType: "html", complete: function (xhr) { - clearTimeout(loaderTimeout); $("#flash").empty(); - $("#sidebar_loader").hide(); + $("#sidebar_loader").removeClass("delayed-fade-in").hide(); var content = $(xhr.responseText); @@ -214,7 +207,7 @@ $(document).ready(function () { if (OSM.MATOMO) { map.on("layeradd", function (e) { if (e.layer.options) { - var goal = OSM.MATOMO.goals[e.layer.options.keyid]; + var goal = OSM.MATOMO.goals[e.layer.options.layerId]; if (goal) { $("body").trigger("matomogoal", goal); @@ -262,20 +255,10 @@ $(document).ready(function () { }); function sendRemoteEditCommand(url, callback) { - var iframe = $("