//= require index/changeset
//= require index/query
//= require router
-//= require bowser
+//= require querystring
$(document).ready(function () {
+ var querystring = require("querystring-component");
+
var loaderTimeout;
var map = new L.OSM.Map("map", {
});
OSM.loadSidebarContent = function (path, callback) {
+ var content_path = path;
+
map.setSidebarOverlaid(false);
clearTimeout(loaderTimeout);
// IE<10 doesn't respect Vary: X-Requested-With header, so
// prevent caching the XHR response as a full-page URL.
- if (path.indexOf("?") >= 0) {
- path += "&xhr=1";
+ if (content_path.indexOf("?") >= 0) {
+ content_path += "&xhr=1";
} else {
- path += "?xhr=1";
+ content_path += "?xhr=1";
}
$("#sidebar_content")
.empty();
$.ajax({
- url: path,
+ url: content_path,
dataType: "html",
complete: function (xhr) {
clearTimeout(loaderTimeout);
iconLoading: "icon geolocate",
strings: {
title: I18n.t("javascripts.map.locate.title"),
+ metersUnit: I18n.t("javascripts.map.locate.metersUnit"),
+ feetUnit: I18n.t("javascripts.map.locate.feetUnit"),
popup: I18n.t("javascripts.map.locate.popup")
}
}).addTo(map);
bottom: bbox.getSouth() - 0.0001
};
- if (location.protocol === "http" ||
- bowser.check({ chrome: "53", firefox: "55" })) {
- url = "http://127.0.0.1:8111/load_and_zoom?";
- } else {
- url = "https://127.0.0.1:8112/load_and_zoom?";
- }
+ url = "http://127.0.0.1:8111/load_and_zoom?";
if (object) query.select = object.type + object.id;
});
}
});
+
+ $(".colour-preview-box").each(function () {
+ $(this).css("background-color", $(this).data("colour"));
+ });
}
page.unload = function () {