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")
|
||||
.appendTo($ui);
|
||||
|
||||
var baseLayers = $("<ul class='list-unstyled'>")
|
||||
var baseLayers = $("<ul class='list-unstyled mb-0'>")
|
||||
.appendTo(baseSection);
|
||||
|
||||
layers.forEach(function (layer) {
|
||||
var item = $("<li>")
|
||||
.attr("class", "rounded-3")
|
||||
.appendTo(baseLayers);
|
||||
|
||||
if (map.hasLayer(layer)) {
|
||||
|
|
|
@ -23,17 +23,15 @@ L.OSM.share = function (options) {
|
|||
$("<div>")
|
||||
.attr("class", "form-check mb-3")
|
||||
.appendTo($form)
|
||||
.append(
|
||||
$("<label>")
|
||||
.append($("<label>")
|
||||
.attr("for", "link_marker")
|
||||
.attr("class", "form-check-label")
|
||||
.append(
|
||||
$("<input>")
|
||||
.text(I18n.t("javascripts.share.include_marker")))
|
||||
.append($("<input>")
|
||||
.attr("id", "link_marker")
|
||||
.attr("type", "checkbox")
|
||||
.attr("class", "form-check-input")
|
||||
.bind("change", toggleMarker))
|
||||
.append(I18n.t("javascripts.share.include_marker")));
|
||||
.bind("change", toggleMarker));
|
||||
|
||||
$("<div class='btn-group btn-group-sm mb-2'>")
|
||||
.appendTo($form)
|
||||
|
@ -70,6 +68,8 @@ L.OSM.share = function (options) {
|
|||
.append($("<input>")
|
||||
.attr("id", "long_input")
|
||||
.attr("type", "text")
|
||||
.attr("class", "form-control form-control-sm font-monospace")
|
||||
.attr("readonly", true)
|
||||
.on("click", select));
|
||||
|
||||
$("<div>")
|
||||
|
@ -79,6 +79,8 @@ L.OSM.share = function (options) {
|
|||
.append($("<input>")
|
||||
.attr("id", "short_input")
|
||||
.attr("type", "text")
|
||||
.attr("class", "form-control form-control-sm font-monospace")
|
||||
.attr("readonly", true)
|
||||
.on("click", select));
|
||||
|
||||
$("<div>")
|
||||
|
@ -88,6 +90,8 @@ L.OSM.share = function (options) {
|
|||
.append(
|
||||
$("<textarea>")
|
||||
.attr("id", "embed_html")
|
||||
.attr("class", "form-control form-control-sm font-monospace")
|
||||
.attr("readonly", true)
|
||||
.on("click", select))
|
||||
.append(
|
||||
$("<p>")
|
||||
|
@ -132,45 +136,60 @@ L.OSM.share = function (options) {
|
|||
.appendTo($imageSection);
|
||||
|
||||
$("<div>")
|
||||
.attr("class", "mb-3 form-check")
|
||||
.appendTo($form)
|
||||
.append(
|
||||
$("<label>")
|
||||
.attr("for", "image_filter")
|
||||
.attr("class", "form-check-label")
|
||||
.append(
|
||||
$("<input>")
|
||||
.attr("id", "image_filter")
|
||||
.attr("type", "checkbox")
|
||||
.attr("class", "form-check-input")
|
||||
.bind("change", toggleFilter))
|
||||
.append(I18n.t("javascripts.share.custom_dimensions")));
|
||||
|
||||
$("<div>")
|
||||
.appendTo($form)
|
||||
.append(
|
||||
$("<label>")
|
||||
.attr("class", "row mb-3")
|
||||
.append($("<label>")
|
||||
.attr("for", "mapnik_format")
|
||||
.attr("class", "col-auto col-form-label")
|
||||
.text(I18n.t("javascripts.share.format")))
|
||||
.append($("<div>")
|
||||
.attr("class", "col-auto")
|
||||
.append($("<select>")
|
||||
.attr("name", "mapnik_format")
|
||||
.attr("id", "mapnik_format")
|
||||
.attr("class", "form-select w-auto")
|
||||
.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")));
|
||||
.append($("<option>").val("pdf").text("PDF"))));
|
||||
|
||||
$("<div>")
|
||||
.appendTo($form)
|
||||
.attr("class", "row mb-3")
|
||||
.append($("<label>")
|
||||
.attr("for", "mapnik_scale")
|
||||
.attr("class", "col-auto col-form-label")
|
||||
.text(I18n.t("javascripts.share.scale")))
|
||||
.append("1 : ")
|
||||
.append($("<div>")
|
||||
.attr("class", "col-auto")
|
||||
.append($("<div>")
|
||||
.attr("class", "input-group flex-nowrap")
|
||||
.append($("<span>")
|
||||
.attr("class", "input-group-text")
|
||||
.text("1 : "))
|
||||
.append($("<input>")
|
||||
.attr("name", "mapnik_scale")
|
||||
.attr("id", "mapnik_scale")
|
||||
.attr("type", "text")
|
||||
.on("change", update));
|
||||
.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) {
|
||||
$("<input>")
|
||||
|
|
|
@ -20,9 +20,9 @@ L.OSM.sidebarPane = function (options, uiClass, buttonTitle, paneTitle) {
|
|||
var $ui = $("<div>")
|
||||
.attr("class", uiClass + "-ui");
|
||||
|
||||
$("<div class='sidebar_heading d-flex'>")
|
||||
$("<div class='d-flex p-3 pb-0'>")
|
||||
.appendTo($ui)
|
||||
.append($("<h4 class='flex-grow-1 text-break'>")
|
||||
.append($("<h2 class='flex-grow-1 text-break'>")
|
||||
.text(I18n.t(paneTitle)))
|
||||
.append($("<div>")
|
||||
.append($("<button type='button' class='btn-close'>")
|
||||
|
|
|
@ -486,7 +486,7 @@ body.small-nav {
|
|||
|
||||
.section {
|
||||
border-bottom: 1px solid $grey;
|
||||
padding: 10px 20px;
|
||||
padding: $spacer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -573,29 +573,13 @@ body.small-nav {
|
|||
}
|
||||
|
||||
.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 {
|
||||
width: 100px;
|
||||
}
|
||||
}
|
||||
|
||||
.leaflet-top {
|
||||
top: $lineheight/2 !important;
|
||||
top: 10px !important;
|
||||
.leaflet-control {
|
||||
margin-right: 0px !important;
|
||||
margin-top: 0px !important;
|
||||
|
@ -622,13 +606,6 @@ body.small-nav {
|
|||
|
||||
/* Rules for the sidebar */
|
||||
|
||||
.sidebar_heading {
|
||||
position: relative;
|
||||
padding: $lineheight/2 $lineheight;
|
||||
// background: $offwhite;
|
||||
// border-bottom: 1px solid $grey;
|
||||
}
|
||||
|
||||
#browse_status {
|
||||
input {
|
||||
display: block;
|
||||
|
@ -647,6 +624,9 @@ form {
|
|||
label {
|
||||
font-size: 16px;
|
||||
}
|
||||
.col-form-label {
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
/* Stop bootstrap 5 from floating legends when they don't need to be */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<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| %>
|
||||
<% data.each do |entry| %>
|
||||
<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