mirror of
https://github.com/umap-project/umap.git
synced 2025-05-05 14:01:50 +02:00
Compare commits
1 commit
f09ca48757
...
0e3db72a79
Author | SHA1 | Date | |
---|---|---|---|
![]() |
0e3db72a79 |
22 changed files with 104 additions and 96 deletions
|
@ -3,7 +3,9 @@
|
||||||
*/
|
*/
|
||||||
body, div, ul, ol, li, a, section, nav,
|
body, div, ul, ol, li, a, section, nav,
|
||||||
h1, h2, h3, h4, h5, h6, label,
|
h1, h2, h3, h4, h5, h6, label,
|
||||||
hr, input, textarea, select {
|
hr, input, textarea {
|
||||||
|
-moz-box-sizing:border-box;
|
||||||
|
-webkit-box-sizing:border-box;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
@ -17,11 +19,7 @@ h1, h2, h3, h4, h5, h6, label, hr {
|
||||||
}
|
}
|
||||||
a {
|
a {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: var(--link-color);
|
color: #1F5C39;
|
||||||
}
|
|
||||||
a.main {
|
|
||||||
font-weight: bold;
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
}
|
||||||
a[href^="http"]:not(nav.umap-nav a) {
|
a[href^="http"]:not(nav.umap-nav a) {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
|
@ -83,6 +81,9 @@ hgroup > * {
|
||||||
hgroup {
|
hgroup {
|
||||||
margin-bottom: var(--box-margin);
|
margin-bottom: var(--box-margin);
|
||||||
}
|
}
|
||||||
|
hgroup > :not(:first-child):last-child {
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
hgroup p,
|
hgroup p,
|
||||||
hgroup button {
|
hgroup button {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
@ -201,10 +202,6 @@ dt {
|
||||||
/* Various */
|
/* Various */
|
||||||
/* *********** */
|
/* *********** */
|
||||||
|
|
||||||
.nobr {
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
.text {
|
.text {
|
||||||
word-break: break-word;
|
word-break: break-word;
|
||||||
white-space: pre-line;
|
white-space: pre-line;
|
||||||
|
|
|
@ -19,6 +19,7 @@ input:-moz-placeholder, :-moz-placeholder {
|
||||||
.search-form {
|
.search-form {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: baseline;
|
align-items: baseline;
|
||||||
|
gap: calc(var(--gutter) / 2);
|
||||||
max-width: 800px;
|
max-width: 800px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
@ -185,8 +186,6 @@ h2.tabs a:hover {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
font-size: small;
|
|
||||||
padding: 0 3px;
|
|
||||||
}
|
}
|
||||||
.card {
|
.card {
|
||||||
border: 1px solid var(--color-lightGray);
|
border: 1px solid var(--color-lightGray);
|
||||||
|
@ -214,6 +213,7 @@ h2.tabs a:hover {
|
||||||
/* colors */
|
/* colors */
|
||||||
/* **************************** */
|
/* **************************** */
|
||||||
|
|
||||||
|
input[type="submit"],
|
||||||
.button {
|
.button {
|
||||||
background-color: var(--button-primary-background);
|
background-color: var(--button-primary-background);
|
||||||
color: var(--button-primary-color);
|
color: var(--button-primary-color);
|
||||||
|
@ -405,9 +405,22 @@ html[dir="rtl"] .content .icon-delete {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.table-header form input {
|
||||||
|
border: 2px solid var(--color-darkBlue);
|
||||||
|
border-radius: 0;
|
||||||
|
padding: .5rem 1rem;
|
||||||
|
margin-bottom: 0;
|
||||||
|
line-height: inherit;
|
||||||
|
height: 40px;
|
||||||
|
}
|
||||||
.table-header form input[type="search"] {
|
.table-header form input[type="search"] {
|
||||||
width: 30ch;
|
width: 30ch;
|
||||||
}
|
}
|
||||||
|
.table-header form input[type="submit"] {
|
||||||
|
background-color: var(--color-darkBlue);
|
||||||
|
color: white;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
.table-header .button-download {
|
.table-header .button-download {
|
||||||
width: inherit;
|
width: inherit;
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
background-color: var(--color-darkGray);
|
background-color: var(--color-darkGray);
|
||||||
width: auto;
|
width: auto;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
min-height: initial;
|
|
||||||
}
|
}
|
||||||
.umap-main-edit-toolbox [type=button]:hover {
|
.umap-main-edit-toolbox [type=button]:hover {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
|
@ -14,14 +13,9 @@
|
||||||
padding: 0 var(--text-margin);
|
padding: 0 var(--text-margin);
|
||||||
background-color: inherit;
|
background-color: inherit;
|
||||||
}
|
}
|
||||||
.leaflet-container .edit-undo {
|
|
||||||
margin-left: var(--box-margin);
|
|
||||||
}
|
|
||||||
.leaflet-container .edit-undo[disabled],
|
|
||||||
.leaflet-container .edit-redo[disabled] {
|
|
||||||
filter: invert(.5);
|
|
||||||
}
|
|
||||||
.leaflet-container .edit-save,
|
.leaflet-container .edit-save,
|
||||||
|
.leaflet-container .edit-undo,
|
||||||
|
.leaflet-container .edit-redo,
|
||||||
.leaflet-container .edit-disable,
|
.leaflet-container .edit-disable,
|
||||||
.leaflet-container .connected-peers
|
.leaflet-container .connected-peers
|
||||||
{
|
{
|
||||||
|
@ -46,6 +40,8 @@
|
||||||
color: var(--color-darkGray);
|
color: var(--color-darkGray);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.leaflet-container .edit-undo:hover,
|
||||||
|
.leaflet-container .edit-redo:hover,
|
||||||
.leaflet-container .edit-disable:hover {
|
.leaflet-container .edit-disable:hover {
|
||||||
border: 0.5px solid rgba(153, 153, 153, 0.80);
|
border: 0.5px solid rgba(153, 153, 153, 0.80);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
|
|
@ -7,15 +7,16 @@ input[type="datetime-local"], input[type="email"], input[type="number"],
|
||||||
input[type="search"], input[type="tel"], input[type="time"], input[type="file"],
|
input[type="search"], input[type="tel"], input[type="time"], input[type="file"],
|
||||||
input[type="url"], textarea {
|
input[type="url"], textarea {
|
||||||
background-color: white;
|
background-color: white;
|
||||||
border: 2px solid var(--color-darkBlue);
|
border: 1px solid #CCCCCC;
|
||||||
color: var(--text-color);
|
border-radius: 2px 2px 2px 2px;
|
||||||
|
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) inset;
|
||||||
|
color: rgba(0, 0, 0, 0.75);
|
||||||
display: block;
|
display: block;
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: .5rem 1rem;
|
margin-bottom: var(--box-margin);
|
||||||
|
padding: 7px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
line-height: inherit;
|
|
||||||
min-height: 40px;
|
|
||||||
}
|
}
|
||||||
input[type="range"] {
|
input[type="range"] {
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
|
@ -46,15 +47,11 @@ input[type=checkbox]:checked:after {
|
||||||
content: '✓';
|
content: '✓';
|
||||||
color: var(--color-darkGray);
|
color: var(--color-darkGray);
|
||||||
}
|
}
|
||||||
|
|
||||||
input[data-modified=true] {
|
input[data-modified=true] {
|
||||||
background-color: var(--color-lightCyan);
|
background-color: var(--color-lightCyan);
|
||||||
border: 1px solid var(--color-darkGray);
|
border: 1px solid var(--color-darkGray);
|
||||||
}
|
}
|
||||||
input + select,
|
|
||||||
select + input,
|
|
||||||
input + input {
|
|
||||||
border-left: none;
|
|
||||||
}
|
|
||||||
textarea {
|
textarea {
|
||||||
height: inherit;
|
height: inherit;
|
||||||
padding: 7px;
|
padding: 7px;
|
||||||
|
@ -62,18 +59,13 @@ textarea {
|
||||||
min-height: 6rlh;
|
min-height: 6rlh;
|
||||||
}
|
}
|
||||||
select {
|
select {
|
||||||
border: 2px solid var(--color-darkBlue);
|
border: 1px solid #222;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: var(--button-padding);
|
padding: var(--button-padding);
|
||||||
background-color: var(--background-color);
|
|
||||||
color: var(--text-color);
|
|
||||||
min-height: 40px;
|
|
||||||
}
|
}
|
||||||
.dark select {
|
.dark select {
|
||||||
color: var(--text-color);
|
color: #efefef;
|
||||||
background-color: var(--color-darkGray);
|
background-color: #393F3F;
|
||||||
border-color: var(--color-dark);
|
|
||||||
border-width: 1px;
|
|
||||||
}
|
}
|
||||||
select[multiple="multiple"] {
|
select[multiple="multiple"] {
|
||||||
height: auto;
|
height: auto;
|
||||||
|
@ -83,16 +75,16 @@ select[multiple="multiple"] {
|
||||||
input[type="submit"] {
|
input[type="submit"] {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
margin-bottom: 14px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
border-radius: 2px;
|
||||||
|
font-weight: normal;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
padding: var(--button-padding);
|
padding: var(--button-padding);
|
||||||
border: none;
|
border: none;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
background-color: white;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
background-color: var(--color-darkBlue);
|
|
||||||
color: white;
|
|
||||||
font-weight: normal;
|
|
||||||
min-height: 40px;
|
|
||||||
}
|
}
|
||||||
.dark .button,
|
.dark .button,
|
||||||
.dark [type="button"] {
|
.dark [type="button"] {
|
||||||
|
@ -100,9 +92,6 @@ input[type="submit"] {
|
||||||
color: var(--text-color);
|
color: var(--text-color);
|
||||||
border: 1px solid #1b1f20;
|
border: 1px solid #1b1f20;
|
||||||
}
|
}
|
||||||
.button.primary {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
.dark .button.primary:not([disabled]),
|
.dark .button.primary:not([disabled]),
|
||||||
.dark [type="button"].primary:not([disabled]) {
|
.dark [type="button"].primary:not([disabled]) {
|
||||||
background-color: var(--color-brightCyan);
|
background-color: var(--color-brightCyan);
|
||||||
|
@ -171,14 +160,6 @@ input + .help-text {
|
||||||
.formbox.with-switch {
|
.formbox.with-switch {
|
||||||
padding-top: 2px;
|
padding-top: 2px;
|
||||||
}
|
}
|
||||||
.with-switch {
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
.formbox select,
|
|
||||||
.formbox textarea,
|
|
||||||
.formbox input {
|
|
||||||
margin-bottom: var(--text-margin);
|
|
||||||
}
|
|
||||||
fieldset.formbox {
|
fieldset.formbox {
|
||||||
border: none;
|
border: none;
|
||||||
border-top: 1px solid var(--color-lightGray);
|
border-top: 1px solid var(--color-lightGray);
|
||||||
|
@ -219,9 +200,8 @@ input[value]:invalid {
|
||||||
background-color: darkred;
|
background-color: darkred;
|
||||||
}
|
}
|
||||||
.dark input, .dark textarea {
|
.dark input, .dark textarea {
|
||||||
background-color: var(--color-darkerGray);
|
background-color: #232729;
|
||||||
border-color: var(--color-dark);
|
border-color: #1b1f20;
|
||||||
border-width: 1px;
|
|
||||||
color: #efefef;
|
color: #efefef;
|
||||||
}
|
}
|
||||||
details {
|
details {
|
||||||
|
@ -297,6 +277,9 @@ input.switch:empty ~ label {
|
||||||
text-indent: 6em;
|
text-indent: 6em;
|
||||||
margin: 0.2em 0;
|
margin: 0.2em 0;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
|
-ms-user-select: none;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
text-shadow: 0 1px rgba(0, 0, 0, 0.1);
|
text-shadow: 0 1px rgba(0, 0, 0, 0.1);
|
||||||
width: 80px;
|
width: 80px;
|
||||||
|
@ -584,7 +567,6 @@ input.blur {
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
border-start-end-radius: 0;
|
border-start-end-radius: 0;
|
||||||
border-end-end-radius: 0;
|
border-end-end-radius: 0;
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
}
|
||||||
.blur + .button,
|
.blur + .button,
|
||||||
.blur + [type="button"] {
|
.blur + [type="button"] {
|
||||||
|
|
|
@ -61,7 +61,7 @@ export default class Browser {
|
||||||
DomEvent.on(zoom_to, 'click', viewFeature)
|
DomEvent.on(zoom_to, 'click', viewFeature)
|
||||||
DomEvent.on(title, 'click', viewFeature)
|
DomEvent.on(title, 'click', viewFeature)
|
||||||
DomEvent.on(edit, 'click', feature.edit, feature)
|
DomEvent.on(edit, 'click', feature.edit, feature)
|
||||||
DomEvent.on(del, 'click', feature.del, feature)
|
DomEvent.on(del, 'click', feature.confirmDelete, feature)
|
||||||
// HOTFIX. Remove when this is released:
|
// HOTFIX. Remove when this is released:
|
||||||
// https://github.com/Leaflet/Leaflet/pull/9052
|
// https://github.com/Leaflet/Leaflet/pull/9052
|
||||||
DomEvent.disableClickPropagation(row)
|
DomEvent.disableClickPropagation(row)
|
||||||
|
|
|
@ -278,8 +278,7 @@ class Feature {
|
||||||
<i class="icon icon-24 icon-delete"></i>${translate('Delete')}
|
<i class="icon icon-24 icon-delete"></i>${translate('Delete')}
|
||||||
</button>`)
|
</button>`)
|
||||||
button.addEventListener('click', () => {
|
button.addEventListener('click', () => {
|
||||||
this.del()
|
this.confirmDelete().then(() => this._umap.editPanel.close())
|
||||||
this._umap.editPanel.close()
|
|
||||||
})
|
})
|
||||||
container.appendChild(button)
|
container.appendChild(button)
|
||||||
}
|
}
|
||||||
|
@ -364,6 +363,17 @@ class Feature {
|
||||||
return popup.loadContent()
|
return popup.loadContent()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async confirmDelete() {
|
||||||
|
const confirmed = await this._umap.dialog.confirm(
|
||||||
|
translate('Are you sure you want to delete the feature?')
|
||||||
|
)
|
||||||
|
if (confirmed) {
|
||||||
|
this.del()
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
del(sync) {
|
del(sync) {
|
||||||
this.isDirty = true
|
this.isDirty = true
|
||||||
this._umap._leafletMap.closePopup()
|
this._umap._leafletMap.closePopup()
|
||||||
|
@ -508,7 +518,7 @@ class Feature {
|
||||||
icon: 'icon-edit',
|
icon: 'icon-edit',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
action: () => this.del(),
|
action: () => this.confirmDelete(),
|
||||||
title: translate('Delete this feature'),
|
title: translate('Delete this feature'),
|
||||||
icon: 'icon-delete',
|
icon: 'icon-delete',
|
||||||
},
|
},
|
||||||
|
@ -663,7 +673,7 @@ class Feature {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: translate('Delete this feature'),
|
label: translate('Delete this feature'),
|
||||||
action: () => this.del(),
|
action: () => this.confirmDelete(),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: translate('Clone this feature'),
|
label: translate('Clone this feature'),
|
||||||
|
|
|
@ -1237,14 +1237,23 @@ export class DataLayer {
|
||||||
translate('Delete layer')
|
translate('Delete layer')
|
||||||
)
|
)
|
||||||
if (this.isReadOnly()) {
|
if (this.isReadOnly()) {
|
||||||
container.classList.add('readonly')
|
DomUtil.addClass(container, 'readonly')
|
||||||
} else {
|
} else {
|
||||||
edit.addEventListener('click', () => this.edit())
|
DomEvent.on(edit, 'click', this.edit, this)
|
||||||
table.addEventListener('click', () => this.tableEdit())
|
DomEvent.on(table, 'click', this.tableEdit, this)
|
||||||
remove.addEventListener('click', () => {
|
DomEvent.on(
|
||||||
|
remove,
|
||||||
|
'click',
|
||||||
|
function () {
|
||||||
if (!this.isVisible()) return
|
if (!this.isVisible()) return
|
||||||
|
this._umap.dialog
|
||||||
|
.confirm(translate('Are you sure you want to delete this layer?'))
|
||||||
|
.then(() => {
|
||||||
this.del()
|
this.del()
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
this
|
||||||
|
)
|
||||||
}
|
}
|
||||||
DomEvent.on(toggle, 'click', () => this.toggle())
|
DomEvent.on(toggle, 'click', () => this.toggle())
|
||||||
DomEvent.on(zoomTo, 'click', this.zoomTo, this)
|
DomEvent.on(zoomTo, 'click', this.zoomTo, this)
|
||||||
|
|
|
@ -152,9 +152,7 @@ Fields.Textarea = class extends BaseElement {
|
||||||
this.textarea.value = value
|
this.textarea.value = value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
clear() {
|
|
||||||
this.textarea.value = ''
|
|
||||||
}
|
|
||||||
value() {
|
value() {
|
||||||
return this.textarea.value
|
return this.textarea.value
|
||||||
}
|
}
|
||||||
|
|
|
@ -196,7 +196,7 @@ export default class Help {
|
||||||
.split('+')
|
.split('+')
|
||||||
.map((el) => `<kbd>${el}</kbd>`)
|
.map((el) => `<kbd>${el}</kbd>`)
|
||||||
.join('+')
|
.join('+')
|
||||||
label += ` <span class="nobr">${shortcut}</span>`
|
label += ` ${shortcut}`
|
||||||
} else {
|
} else {
|
||||||
label += ` (${shortcut})`
|
label += ` (${shortcut})`
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,11 +11,13 @@ const TOP_BAR_TEMPLATE = `
|
||||||
<div class="logo"><a class="" href="/" title="${translate('Go to the homepage')}">uMap</a></div>
|
<div class="logo"><a class="" href="/" title="${translate('Go to the homepage')}">uMap</a></div>
|
||||||
<button class="map-name flat truncate" type="button" data-ref="name"></button>
|
<button class="map-name flat truncate" type="button" data-ref="name"></button>
|
||||||
<button class="share-status flat truncate" type="button" data-ref="share"></button>
|
<button class="share-status flat truncate" type="button" data-ref="share"></button>
|
||||||
<button class="edit-undo round flat" type="button" data-ref="undo" disabled>
|
<button class="edit-undo round" type="button" data-ref="undo" disabled>
|
||||||
<i class="icon icon-16 icon-undo"></i>
|
<i class="icon icon-16 icon-undo"></i>
|
||||||
|
<span>${translate('Undo')}</span>
|
||||||
</button>
|
</button>
|
||||||
<button class="edit-redo round flat" type="button" data-ref="redo" disabled>
|
<button class="edit-redo round" type="button" data-ref="redo" disabled>
|
||||||
<i class="icon icon-16 icon-redo"></i>
|
<i class="icon icon-16 icon-redo"></i>
|
||||||
|
<span>${translate('Redo')}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="umap-right-edit-toolbox" data-ref="right">
|
<div class="umap-right-edit-toolbox" data-ref="right">
|
||||||
|
|
|
@ -126,7 +126,6 @@ export function escapeHTML(s) {
|
||||||
'frameborder',
|
'frameborder',
|
||||||
'scrolling',
|
'scrolling',
|
||||||
'controls',
|
'controls',
|
||||||
'class',
|
|
||||||
],
|
],
|
||||||
ALLOWED_ATTR: ['href', 'src', 'width', 'height', 'style', 'dir', 'title', 'type'],
|
ALLOWED_ATTR: ['href', 'src', 'width', 'height', 'style', 'dir', 'title', 'type'],
|
||||||
// Added: `geo:` URL scheme as defined in RFC5870:
|
// Added: `geo:` URL scheme as defined in RFC5870:
|
||||||
|
|
|
@ -37,6 +37,7 @@ html[dir="rtl"] .leaflet-tooltip-pane > * {
|
||||||
background-color: var(--color-lightGray);
|
background-color: var(--color-lightGray);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* *********** */
|
/* *********** */
|
||||||
/* Structure */
|
/* Structure */
|
||||||
/* *********** */
|
/* *********** */
|
||||||
|
@ -93,8 +94,6 @@ html[dir="rtl"] .leaflet-tooltip-pane > * {
|
||||||
background-image: url('./img/24.svg');
|
background-image: url('./img/24.svg');
|
||||||
text-indent: -9999px;
|
text-indent: -9999px;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
background-color: white;
|
|
||||||
min-height: initial;
|
|
||||||
}
|
}
|
||||||
.leaflet-control.display-on-more,
|
.leaflet-control.display-on-more,
|
||||||
.umap-control-less {
|
.umap-control-less {
|
||||||
|
@ -450,7 +449,7 @@ ul.photon-autocomplete {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 16px;
|
width: 16px;
|
||||||
height: 16px;
|
height: 16px;
|
||||||
margin-inline-start: 2px;
|
margin-inline-start: 5px;
|
||||||
background-position: 2px -4px;
|
background-position: 2px -4px;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-image: url('./img/16.svg');
|
background-image: url('./img/16.svg');
|
||||||
|
@ -471,7 +470,6 @@ ul.photon-autocomplete {
|
||||||
}
|
}
|
||||||
.umap-getstarted button {
|
.umap-getstarted button {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-bottom: var(--text-margin);
|
|
||||||
}
|
}
|
||||||
.umap-help {
|
.umap-help {
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
|
@ -662,10 +660,6 @@ a.umap-control-caption,
|
||||||
.umap-caption .header i.icon {
|
.umap-caption .header i.icon {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
.umap-caption button {
|
|
||||||
background-color: var(--background-color);
|
|
||||||
color: var(--text-color);
|
|
||||||
}
|
|
||||||
.umap-browser .main-toolbox {
|
.umap-browser .main-toolbox {
|
||||||
padding-left: 4px; /* Align with toolbox below */
|
padding-left: 4px; /* Align with toolbox below */
|
||||||
border-top: 1px solid var(--color-mediumGray);
|
border-top: 1px solid var(--color-mediumGray);
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
:root {
|
:root {
|
||||||
/* Colors. */
|
/* Colors. */
|
||||||
|
--color-waterMint: #B9F5D2;
|
||||||
--color-darkBlue: #263B58;
|
--color-darkBlue: #263B58;
|
||||||
--color-lighterGray: #f6f6f6;
|
--color-lighterGray: #f6f6f6;
|
||||||
--color-lightGray: #ddd;
|
--color-lightGray: #ddd;
|
||||||
|
@ -11,17 +12,16 @@
|
||||||
--color-limeGreen: #b9f5d2;
|
--color-limeGreen: #b9f5d2;
|
||||||
--color-brightCyan: #46ece6;
|
--color-brightCyan: #46ece6;
|
||||||
--color-lightCyan: #d4fbf9;
|
--color-lightCyan: #d4fbf9;
|
||||||
--color-darkCyan: #009099;
|
--color-darkCyan: #43a39f;
|
||||||
--color-red: #c60f13;
|
--color-red: #c60f13;
|
||||||
--color-darkRed: #5b2a2a;
|
--color-darkRed: #5b2a2a;
|
||||||
|
|
||||||
--background-color: var(--color-light);
|
--background-color: var(--color-light);
|
||||||
--color-accent: var(--color-brightCyan);
|
--color-accent: var(--color-brightCyan);
|
||||||
--text-color: var(--color-dark);
|
--text-color: var(--color-dark);
|
||||||
--link-color: var(--color-darkCyan);
|
|
||||||
|
|
||||||
/* Buttons. */
|
/* Buttons. */
|
||||||
--button-primary-background: var(--color-limeGreen);
|
--button-primary-background: var(--color-waterMint);
|
||||||
--button-primary-color: var(--color-darkBlue);
|
--button-primary-color: var(--color-darkBlue);
|
||||||
--button-neutral-background: var(--color-lightGray);
|
--button-neutral-background: var(--color-lightGray);
|
||||||
--button-neutral-color: var(--color-darkGray);
|
--button-neutral-color: var(--color-darkGray);
|
||||||
|
|
|
@ -12,14 +12,14 @@
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<h3>{{ map_inst.name }}</h3>
|
<h3><a href="{{ map_inst.get_absolute_url }}">{{ map_inst.name }}</a></h3>
|
||||||
{% with author=map_inst.get_author %}
|
{% with author=map_inst.get_author %}
|
||||||
{% if author %}
|
{% if author %}
|
||||||
<p>{% trans "by" %} <a href="{{ author.get_url }}">{{ author }}</a></p>
|
<p>{% trans "by" %} <a href="{{ author.get_url }}">{{ author }}</a></p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
</div>
|
</div>
|
||||||
<a class="main" href="{{ map_inst.get_absolute_url }}">{% translate "See the map" %}</a>
|
<a class="button" href="{{ map_inst.get_absolute_url }}">{% translate "See the map" %}</a>
|
||||||
</hgroup>
|
</hgroup>
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
<option value="{{ value }}" {% if request.GET.tags == value %}selected{% endif %}>{{ label }}</option>
|
<option value="{{ value }}" {% if request.GET.tags == value %}selected{% endif %}>{{ label }}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
<input type="submit" value="{% trans "Search" %}" />
|
<input type="submit" value="{% trans "Search" %}" class="neutral" />
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -348,8 +348,9 @@ def test_should_redraw_list_on_feature_delete(live_server, openmap, page, bootst
|
||||||
buttons = page.locator(".umap-browser .datalayer li .icon-delete")
|
buttons = page.locator(".umap-browser .datalayer li .icon-delete")
|
||||||
expect(buttons).to_have_count(3)
|
expect(buttons).to_have_count(3)
|
||||||
buttons.first.click()
|
buttons.first.click()
|
||||||
|
page.locator("dialog").get_by_role("button", name="OK").click()
|
||||||
expect(buttons).to_have_count(2)
|
expect(buttons).to_have_count(2)
|
||||||
page.locator(".edit-undo").click()
|
page.get_by_role("button", name="Undo").click()
|
||||||
expect(buttons).to_have_count(3)
|
expect(buttons).to_have_count(3)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -261,7 +261,7 @@ def test_can_create_new_rule(live_server, page, openmap):
|
||||||
page.get_by_title("AliceBlue").first.click()
|
page.get_by_title("AliceBlue").first.click()
|
||||||
colors = getColors(markers)
|
colors = getColors(markers)
|
||||||
assert colors.count("rgb(240, 248, 255)") == 3
|
assert colors.count("rgb(240, 248, 255)") == 3
|
||||||
page.locator(".edit-undo").click()
|
page.get_by_role("button", name="Undo").click()
|
||||||
colors = getColors(markers)
|
colors = getColors(markers)
|
||||||
assert colors.count("rgb(240, 248, 255)") == 0
|
assert colors.count("rgb(240, 248, 255)") == 0
|
||||||
|
|
||||||
|
|
|
@ -61,9 +61,10 @@ def test_cancel_deleting_datalayer_should_restore(
|
||||||
expect(markers).to_have_count(1)
|
expect(markers).to_have_count(1)
|
||||||
page.get_by_role("button", name="Manage layers").click()
|
page.get_by_role("button", name="Manage layers").click()
|
||||||
page.locator(".panel.right").get_by_title("Delete layer").click()
|
page.locator(".panel.right").get_by_title("Delete layer").click()
|
||||||
|
page.get_by_role("button", name="OK").click()
|
||||||
expect(markers).to_have_count(0)
|
expect(markers).to_have_count(0)
|
||||||
expect(page.get_by_text("test datalayer")).to_be_hidden()
|
expect(page.get_by_text("test datalayer")).to_be_hidden()
|
||||||
page.locator(".edit-undo").click()
|
page.get_by_role("button", name="Undo").click()
|
||||||
expect(markers).to_have_count(1)
|
expect(markers).to_have_count(1)
|
||||||
expect(page.locator(".umap-browser").get_by_text("test datalayer")).to_be_visible()
|
expect(page.locator(".umap-browser").get_by_text("test datalayer")).to_be_visible()
|
||||||
|
|
||||||
|
@ -202,6 +203,7 @@ def test_deleting_datalayer_should_remove_from_browser_and_layers_list(
|
||||||
expect(panel.get_by_text("test datalayer")).to_be_visible()
|
expect(panel.get_by_text("test datalayer")).to_be_visible()
|
||||||
expect(edit_panel.get_by_text("test datalayer")).to_be_visible()
|
expect(edit_panel.get_by_text("test datalayer")).to_be_visible()
|
||||||
page.locator(".panel.right").get_by_title("Delete layer").click()
|
page.locator(".panel.right").get_by_title("Delete layer").click()
|
||||||
|
page.get_by_role("button", name="OK").click()
|
||||||
expect(panel.get_by_text("test datalayer")).to_be_hidden()
|
expect(panel.get_by_text("test datalayer")).to_be_hidden()
|
||||||
expect(edit_panel.get_by_text("test datalayer")).to_be_hidden()
|
expect(edit_panel.get_by_text("test datalayer")).to_be_hidden()
|
||||||
|
|
||||||
|
@ -215,6 +217,7 @@ def test_deleting_datalayer_should_remove_from_caption(
|
||||||
page.get_by_role("button", name="Manage layers").click()
|
page.get_by_role("button", name="Manage layers").click()
|
||||||
expect(panel.get_by_text("test datalayer")).to_be_visible()
|
expect(panel.get_by_text("test datalayer")).to_be_visible()
|
||||||
page.locator(".panel.right").get_by_title("Delete layer").click()
|
page.locator(".panel.right").get_by_title("Delete layer").click()
|
||||||
|
page.get_by_role("button", name="OK").click()
|
||||||
expect(panel.get_by_text("test datalayer")).to_be_hidden()
|
expect(panel.get_by_text("test datalayer")).to_be_hidden()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -117,7 +117,7 @@ def test_should_reset_style_on_cancel(live_server, openmap, page, bootstrap):
|
||||||
expect(page.locator(".leaflet-overlay-pane path[fill='GoldenRod']")).to_have_count(
|
expect(page.locator(".leaflet-overlay-pane path[fill='GoldenRod']")).to_have_count(
|
||||||
1
|
1
|
||||||
)
|
)
|
||||||
page.locator(".edit-undo").click()
|
page.get_by_role("button", name="Undo").click()
|
||||||
expect(page.locator(".leaflet-overlay-pane path[fill='DarkBlue']")).to_have_count(1)
|
expect(page.locator(".leaflet-overlay-pane path[fill='DarkBlue']")).to_have_count(1)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -241,6 +241,7 @@ def test_can_delete_datalayer(live_server, map, login, datalayer):
|
||||||
expect(markers).to_have_count(1)
|
expect(markers).to_have_count(1)
|
||||||
page.get_by_role("button", name="Manage layers").click()
|
page.get_by_role("button", name="Manage layers").click()
|
||||||
page.locator(".panel.right").get_by_title("Delete layer").click()
|
page.locator(".panel.right").get_by_title("Delete layer").click()
|
||||||
|
page.get_by_role("button", name="OK").click()
|
||||||
with page.expect_response(re.compile(r".*/datalayer/delete/.*")):
|
with page.expect_response(re.compile(r".*/datalayer/delete/.*")):
|
||||||
page.get_by_role("button", name="Save").click()
|
page.get_by_role("button", name="Save").click()
|
||||||
expect(markers).to_have_count(0)
|
expect(markers).to_have_count(0)
|
||||||
|
|
|
@ -16,7 +16,7 @@ def test_reseting_map_would_remove_from_save_queue(
|
||||||
page.on("request", register_request)
|
page.on("request", register_request)
|
||||||
page.locator('input[name="name"]').click()
|
page.locator('input[name="name"]').click()
|
||||||
page.locator('input[name="name"]').fill("new name")
|
page.locator('input[name="name"]').fill("new name")
|
||||||
page.locator(".edit-undo").click()
|
page.get_by_role("button", name="Undo").click()
|
||||||
page.wait_for_timeout(500)
|
page.wait_for_timeout(500)
|
||||||
page.get_by_role("button", name="Manage layers").click()
|
page.get_by_role("button", name="Manage layers").click()
|
||||||
page.get_by_role("button", name="Edit", exact=True).click()
|
page.get_by_role("button", name="Edit", exact=True).click()
|
||||||
|
|
|
@ -86,6 +86,7 @@ def test_websocket_connection_can_sync_markers(new_page, asgi_live_server, tilel
|
||||||
# Delete a marker from peer A and check it's been deleted on peer B
|
# Delete a marker from peer A and check it's been deleted on peer B
|
||||||
a_first_marker.click(button="right")
|
a_first_marker.click(button="right")
|
||||||
peerA.get_by_role("button", name="Delete this feature").click()
|
peerA.get_by_role("button", name="Delete this feature").click()
|
||||||
|
peerA.locator("dialog").get_by_role("button", name="OK").click()
|
||||||
expect(a_marker_pane).to_have_count(1)
|
expect(a_marker_pane).to_have_count(1)
|
||||||
expect(b_marker_pane).to_have_count(1)
|
expect(b_marker_pane).to_have_count(1)
|
||||||
|
|
||||||
|
@ -165,6 +166,7 @@ def test_websocket_connection_can_sync_polygons(context, asgi_live_server, tilel
|
||||||
# Delete a polygon from peer A and check it's been deleted on peer B
|
# Delete a polygon from peer A and check it's been deleted on peer B
|
||||||
a_polygon.click(button="right")
|
a_polygon.click(button="right")
|
||||||
peerA.get_by_role("button", name="Delete this feature").click()
|
peerA.get_by_role("button", name="Delete this feature").click()
|
||||||
|
peerA.locator("dialog").get_by_role("button", name="OK").click()
|
||||||
expect(a_polygons).to_have_count(0)
|
expect(a_polygons).to_have_count(0)
|
||||||
expect(b_polygons).to_have_count(0)
|
expect(b_polygons).to_have_count(0)
|
||||||
|
|
||||||
|
@ -483,6 +485,7 @@ def test_should_sync_datalayers_delete(new_page, asgi_live_server, tilelayer):
|
||||||
|
|
||||||
# Delete "datalayer 2" in peerA
|
# Delete "datalayer 2" in peerA
|
||||||
peerA.locator(".datalayer").get_by_role("button", name="Delete layer").first.click()
|
peerA.locator(".datalayer").get_by_role("button", name="Delete layer").first.click()
|
||||||
|
peerA.get_by_role("button", name="OK").click()
|
||||||
expect(peerA.locator(".panel").get_by_text("datalayer 2")).to_be_hidden()
|
expect(peerA.locator(".panel").get_by_text("datalayer 2")).to_be_hidden()
|
||||||
expect(peerB.locator(".panel").get_by_text("datalayer 2")).to_be_hidden()
|
expect(peerB.locator(".panel").get_by_text("datalayer 2")).to_be_hidden()
|
||||||
|
|
||||||
|
@ -683,7 +686,7 @@ def test_should_sync_datalayer_clear(
|
||||||
expect(peerB.locator(".leaflet-marker-icon")).to_have_count(0)
|
expect(peerB.locator(".leaflet-marker-icon")).to_have_count(0)
|
||||||
|
|
||||||
# Undo in peer A
|
# Undo in peer A
|
||||||
peerA.locator(".edit-undo").click()
|
peerA.get_by_role("button", name="Undo").click()
|
||||||
expect(peerA.locator(".leaflet-marker-icon")).to_have_count(1)
|
expect(peerA.locator(".leaflet-marker-icon")).to_have_count(1)
|
||||||
expect(peerB.locator(".leaflet-marker-icon")).to_have_count(1)
|
expect(peerB.locator(".leaflet-marker-icon")).to_have_count(1)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue