Merge remote-tracking branch 'upstream/pull/4233'
This commit is contained in:
commit
1db26ff5f9
5 changed files with 72 additions and 72 deletions
|
@ -8,11 +8,12 @@ L.OSM.layers = function (options) {
|
||||||
.attr("class", "section base-layers")
|
.attr("class", "section base-layers")
|
||||||
.appendTo($ui);
|
.appendTo($ui);
|
||||||
|
|
||||||
var baseLayers = $("<ul class='list-unstyled'>")
|
var baseLayers = $("<ul class='list-unstyled mb-0'>")
|
||||||
.appendTo(baseSection);
|
.appendTo(baseSection);
|
||||||
|
|
||||||
layers.forEach(function (layer) {
|
layers.forEach(function (layer) {
|
||||||
var item = $("<li>")
|
var item = $("<li>")
|
||||||
|
.attr("class", "rounded-3")
|
||||||
.appendTo(baseLayers);
|
.appendTo(baseLayers);
|
||||||
|
|
||||||
if (map.hasLayer(layer)) {
|
if (map.hasLayer(layer)) {
|
||||||
|
|
|
@ -23,17 +23,15 @@ L.OSM.share = function (options) {
|
||||||
$("<div>")
|
$("<div>")
|
||||||
.attr("class", "form-check mb-3")
|
.attr("class", "form-check mb-3")
|
||||||
.appendTo($form)
|
.appendTo($form)
|
||||||
.append(
|
.append($("<label>")
|
||||||
$("<label>")
|
.attr("for", "link_marker")
|
||||||
.attr("for", "link_marker")
|
.attr("class", "form-check-label")
|
||||||
.attr("class", "form-check-label")
|
.text(I18n.t("javascripts.share.include_marker")))
|
||||||
.append(
|
.append($("<input>")
|
||||||
$("<input>")
|
.attr("id", "link_marker")
|
||||||
.attr("id", "link_marker")
|
.attr("type", "checkbox")
|
||||||
.attr("type", "checkbox")
|
.attr("class", "form-check-input")
|
||||||
.attr("class", "form-check-input")
|
.bind("change", toggleMarker));
|
||||||
.bind("change", toggleMarker))
|
|
||||||
.append(I18n.t("javascripts.share.include_marker")));
|
|
||||||
|
|
||||||
$("<div class='btn-group btn-group-sm mb-2'>")
|
$("<div class='btn-group btn-group-sm mb-2'>")
|
||||||
.appendTo($form)
|
.appendTo($form)
|
||||||
|
@ -70,6 +68,8 @@ L.OSM.share = function (options) {
|
||||||
.append($("<input>")
|
.append($("<input>")
|
||||||
.attr("id", "long_input")
|
.attr("id", "long_input")
|
||||||
.attr("type", "text")
|
.attr("type", "text")
|
||||||
|
.attr("class", "form-control form-control-sm font-monospace")
|
||||||
|
.attr("readonly", true)
|
||||||
.on("click", select));
|
.on("click", select));
|
||||||
|
|
||||||
$("<div>")
|
$("<div>")
|
||||||
|
@ -79,6 +79,8 @@ L.OSM.share = function (options) {
|
||||||
.append($("<input>")
|
.append($("<input>")
|
||||||
.attr("id", "short_input")
|
.attr("id", "short_input")
|
||||||
.attr("type", "text")
|
.attr("type", "text")
|
||||||
|
.attr("class", "form-control form-control-sm font-monospace")
|
||||||
|
.attr("readonly", true)
|
||||||
.on("click", select));
|
.on("click", select));
|
||||||
|
|
||||||
$("<div>")
|
$("<div>")
|
||||||
|
@ -88,6 +90,8 @@ L.OSM.share = function (options) {
|
||||||
.append(
|
.append(
|
||||||
$("<textarea>")
|
$("<textarea>")
|
||||||
.attr("id", "embed_html")
|
.attr("id", "embed_html")
|
||||||
|
.attr("class", "form-control form-control-sm font-monospace")
|
||||||
|
.attr("readonly", true)
|
||||||
.on("click", select))
|
.on("click", select))
|
||||||
.append(
|
.append(
|
||||||
$("<p>")
|
$("<p>")
|
||||||
|
@ -132,45 +136,60 @@ L.OSM.share = function (options) {
|
||||||
.appendTo($imageSection);
|
.appendTo($imageSection);
|
||||||
|
|
||||||
$("<div>")
|
$("<div>")
|
||||||
.attr("class", "mb-3 form-check")
|
|
||||||
.appendTo($form)
|
.appendTo($form)
|
||||||
.append(
|
.attr("class", "row mb-3")
|
||||||
$("<label>")
|
.append($("<label>")
|
||||||
.attr("for", "image_filter")
|
.attr("for", "mapnik_format")
|
||||||
.attr("class", "form-check-label")
|
.attr("class", "col-auto col-form-label")
|
||||||
.append(
|
.text(I18n.t("javascripts.share.format")))
|
||||||
$("<input>")
|
.append($("<div>")
|
||||||
.attr("id", "image_filter")
|
.attr("class", "col-auto")
|
||||||
.attr("type", "checkbox")
|
.append($("<select>")
|
||||||
.attr("class", "form-check-input")
|
.attr("name", "mapnik_format")
|
||||||
.bind("change", toggleFilter))
|
.attr("id", "mapnik_format")
|
||||||
.append(I18n.t("javascripts.share.custom_dimensions")));
|
.attr("class", "form-select w-auto")
|
||||||
|
.append($("<option>").val("png").text("PNG").prop("selected", true))
|
||||||
$("<div>")
|
.append($("<option>").val("jpeg").text("JPEG"))
|
||||||
.appendTo($form)
|
.append($("<option>").val("svg").text("SVG"))
|
||||||
.append(
|
.append($("<option>").val("pdf").text("PDF"))));
|
||||||
$("<label>")
|
|
||||||
.attr("for", "mapnik_format")
|
|
||||||
.text(I18n.t("javascripts.share.format")))
|
|
||||||
.append($("<select>")
|
|
||||||
.attr("name", "mapnik_format")
|
|
||||||
.attr("id", "mapnik_format")
|
|
||||||
.append($("<option>").val("png").text("PNG").prop("selected", true))
|
|
||||||
.append($("<option>").val("jpeg").text("JPEG"))
|
|
||||||
.append($("<option>").val("svg").text("SVG"))
|
|
||||||
.append($("<option>").val("pdf").text("PDF")));
|
|
||||||
|
|
||||||
$("<div>")
|
$("<div>")
|
||||||
.appendTo($form)
|
.appendTo($form)
|
||||||
|
.attr("class", "row mb-3")
|
||||||
.append($("<label>")
|
.append($("<label>")
|
||||||
.attr("for", "mapnik_scale")
|
.attr("for", "mapnik_scale")
|
||||||
|
.attr("class", "col-auto col-form-label")
|
||||||
.text(I18n.t("javascripts.share.scale")))
|
.text(I18n.t("javascripts.share.scale")))
|
||||||
.append("1 : ")
|
.append($("<div>")
|
||||||
.append($("<input>")
|
.attr("class", "col-auto")
|
||||||
.attr("name", "mapnik_scale")
|
.append($("<div>")
|
||||||
.attr("id", "mapnik_scale")
|
.attr("class", "input-group flex-nowrap")
|
||||||
.attr("type", "text")
|
.append($("<span>")
|
||||||
.on("change", update));
|
.attr("class", "input-group-text")
|
||||||
|
.text("1 : "))
|
||||||
|
.append($("<input>")
|
||||||
|
.attr("name", "mapnik_scale")
|
||||||
|
.attr("id", "mapnik_scale")
|
||||||
|
.attr("type", "text")
|
||||||
|
.attr("class", "form-control")
|
||||||
|
.on("change", update))));
|
||||||
|
|
||||||
|
$("<div>")
|
||||||
|
.attr("class", "row mb-3")
|
||||||
|
.appendTo($form)
|
||||||
|
.append($("<div>")
|
||||||
|
.attr("class", "col-auto")
|
||||||
|
.append($("<div>")
|
||||||
|
.attr("class", "form-check")
|
||||||
|
.append($("<label>")
|
||||||
|
.attr("for", "image_filter")
|
||||||
|
.attr("class", "form-check-label")
|
||||||
|
.text(I18n.t("javascripts.share.custom_dimensions")))
|
||||||
|
.append($("<input>")
|
||||||
|
.attr("id", "image_filter")
|
||||||
|
.attr("type", "checkbox")
|
||||||
|
.attr("class", "form-check-input")
|
||||||
|
.bind("change", toggleFilter))));
|
||||||
|
|
||||||
["minlon", "minlat", "maxlon", "maxlat"].forEach(function (name) {
|
["minlon", "minlat", "maxlon", "maxlat"].forEach(function (name) {
|
||||||
$("<input>")
|
$("<input>")
|
||||||
|
|
|
@ -20,9 +20,9 @@ L.OSM.sidebarPane = function (options, uiClass, buttonTitle, paneTitle) {
|
||||||
var $ui = $("<div>")
|
var $ui = $("<div>")
|
||||||
.attr("class", uiClass + "-ui");
|
.attr("class", uiClass + "-ui");
|
||||||
|
|
||||||
$("<div class='sidebar_heading d-flex'>")
|
$("<div class='d-flex p-3 pb-0'>")
|
||||||
.appendTo($ui)
|
.appendTo($ui)
|
||||||
.append($("<h4 class='flex-grow-1 text-break'>")
|
.append($("<h2 class='flex-grow-1 text-break'>")
|
||||||
.text(I18n.t(paneTitle)))
|
.text(I18n.t(paneTitle)))
|
||||||
.append($("<div>")
|
.append($("<div>")
|
||||||
.append($("<button type='button' class='btn-close'>")
|
.append($("<button type='button' class='btn-close'>")
|
||||||
|
|
|
@ -486,7 +486,7 @@ body.small-nav {
|
||||||
|
|
||||||
.section {
|
.section {
|
||||||
border-bottom: 1px solid $grey;
|
border-bottom: 1px solid $grey;
|
||||||
padding: 10px 20px;
|
padding: $spacer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -573,29 +573,13 @@ body.small-nav {
|
||||||
}
|
}
|
||||||
|
|
||||||
.share-ui {
|
.share-ui {
|
||||||
.share-link {
|
|
||||||
input[type=text],
|
|
||||||
textarea {
|
|
||||||
width: 100%;
|
|
||||||
font-family: monospace;
|
|
||||||
font-size: small;
|
|
||||||
line-height: 1.3;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.share-image {
|
|
||||||
label {
|
|
||||||
margin-right: 10px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#mapnik_scale {
|
#mapnik_scale {
|
||||||
width: 100px;
|
width: 100px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.leaflet-top {
|
.leaflet-top {
|
||||||
top: $lineheight/2 !important;
|
top: 10px !important;
|
||||||
.leaflet-control {
|
.leaflet-control {
|
||||||
margin-right: 0px !important;
|
margin-right: 0px !important;
|
||||||
margin-top: 0px !important;
|
margin-top: 0px !important;
|
||||||
|
@ -622,13 +606,6 @@ body.small-nav {
|
||||||
|
|
||||||
/* Rules for the sidebar */
|
/* Rules for the sidebar */
|
||||||
|
|
||||||
.sidebar_heading {
|
|
||||||
position: relative;
|
|
||||||
padding: $lineheight/2 $lineheight;
|
|
||||||
// background: $offwhite;
|
|
||||||
// border-bottom: 1px solid $grey;
|
|
||||||
}
|
|
||||||
|
|
||||||
#browse_status {
|
#browse_status {
|
||||||
input {
|
input {
|
||||||
display: block;
|
display: block;
|
||||||
|
@ -647,6 +624,9 @@ form {
|
||||||
label {
|
label {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
|
.col-form-label {
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Stop bootstrap 5 from floating legends when they don't need to be */
|
/* Stop bootstrap 5 from floating legends when they don't need to be */
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<div id="mapkey">
|
<div id="mapkey">
|
||||||
<table class="table table-sm table-borderless mapkey-table">
|
<table class="table table-sm table-borderless mapkey-table mb-0">
|
||||||
<% YAML.load_file(Rails.root.join("config/key.yml")).each do |name,data| %>
|
<% YAML.load_file(Rails.root.join("config/key.yml")).each do |name,data| %>
|
||||||
<% data.each do |entry| %>
|
<% data.each do |entry| %>
|
||||||
<tr class="mapkey-table-entry" data-layer="<%= name %>" data-zoom-min="<%= entry["min_zoom"] %>" data-zoom-max="<%= entry["max_zoom"] %>">
|
<tr class="mapkey-table-entry" data-layer="<%= name %>" data-zoom-min="<%= entry["min_zoom"] %>" data-zoom-max="<%= entry["max_zoom"] %>">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue