From 8a2109948f5259af1f2c5f6574089b51f8de1c74 Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Wed, 15 Nov 2023 18:15:30 +0100 Subject: [PATCH] Picto field: add hover and selected style --- umap/static/umap/base.css | 11 +++++------ umap/static/umap/js/umap.forms.js | 6 +++--- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/umap/static/umap/base.css b/umap/static/umap/base.css index 11b5e62f..4e931b11 100644 --- a/umap/static/umap/base.css +++ b/umap/static/umap/base.css @@ -569,9 +569,6 @@ i.info { background-color: #999; text-align: center; margin-bottom: 5px; - display: none; -} -.umap-pictogram-choice.visible { display: block; } .umap-pictogram-choice img { @@ -579,11 +576,13 @@ i.info { max-width: 24px; } .umap-pictogram-choice:hover, -.umap-pictogram-choice.selected, .umap-color-picker span:hover { - box-shadow: 0 0 4px 0 rgb(66, 236, 230); - background-color: #aaa; + background-color: #bebebe; } +.umap-pictogram-choice.selected { + box-shadow: inset 0 0 0 1px #e9e9e9; +} + .umap-pictogram-choice .leaflet-marker-icon { bottom: 0; left: 30px; diff --git a/umap/static/umap/js/umap.forms.js b/umap/static/umap/js/umap.forms.js index 4665fb09..fcd00ae9 100644 --- a/umap/static/umap/js/umap.forms.js +++ b/umap/static/umap/js/umap.forms.js @@ -591,7 +591,7 @@ L.FormBuilder.IconUrl = L.FormBuilder.BlurInput.extend({ '', L.DomUtil.create( 'div', - 'umap-pictogram-choice visible', + 'umap-pictogram-choice', this.buttonsContainer ) ) @@ -603,7 +603,7 @@ L.FormBuilder.IconUrl = L.FormBuilder.BlurInput.extend({ '', L.DomUtil.create( 'div', - 'umap-pictogram-choice visible', + 'umap-pictogram-choice', this.buttonsContainer ) ) @@ -621,7 +621,7 @@ L.FormBuilder.IconUrl = L.FormBuilder.BlurInput.extend({ }, addIconPreview: function (pictogram, parent) { - const baseClass = 'umap-pictogram-choice visible', + const baseClass = 'umap-pictogram-choice', value = pictogram.src, search = this.searchInput.value.toLowerCase(), title = pictogram.attribution