diff --git a/umap/static/umap/js/umap.forms.js b/umap/static/umap/js/umap.forms.js index bca48214..e9e8ab08 100644 --- a/umap/static/umap/js/umap.forms.js +++ b/umap/static/umap/js/umap.forms.js @@ -745,14 +745,12 @@ L.FormBuilder.Switch = L.FormBuilder.CheckBox.extend({ }) L.FormBuilder.FacetSearchBase = L.FormBuilder.Element.extend({ - buildLabel: function () { this.label = L.DomUtil.element({ tagName: 'legend', textContent: this.options.label, }) - } - + }, }) L.FormBuilder.FacetSearchChoices = L.FormBuilder.FacetSearchBase.extend({ build: function () { @@ -865,13 +863,13 @@ L.FormBuilder.MinMaxBase = L.FormBuilder.FacetSearchBase.extend({ }, isMinModified: function () { - const default_ = this.minInput.getAttribute("value") + const default_ = this.minInput.getAttribute('value') const current = this.minInput.value return current != default_ }, isMaxModified: function () { - const default_ = this.maxInput.getAttribute("value") + const default_ = this.maxInput.getAttribute('value') const current = this.maxInput.value return current != default_ }, diff --git a/umap/static/umap/js/umap.js b/umap/static/umap/js/umap.js index 4fd15c4a..74f22afb 100644 --- a/umap/static/umap/js/umap.js +++ b/umap/static/umap/js/umap.js @@ -33,6 +33,7 @@ U.Map = L.Map.extend({ includes: [ControlsMixin], initialize: function (el, geojson) { + this.sync = new U.SyncEngine(this) // Locale name (pt_PT, en_US…) // To be used for Django localization if (geojson.properties.locale) L.setLocale(geojson.properties.locale) @@ -153,7 +154,6 @@ U.Map = L.Map.extend({ this.options.onLoadPanel = 'datafilters' } - this.sync = new U.SyncEngine(this) let isDirty = false // self status try { Object.defineProperty(this, 'isDirty', { diff --git a/umap/static/umap/js/umap.layer.js b/umap/static/umap/js/umap.layer.js index 9a19249e..7ec37734 100644 --- a/umap/static/umap/js/umap.layer.js +++ b/umap/static/umap/js/umap.layer.js @@ -1368,6 +1368,12 @@ U.DataLayer = L.Evented.extend({ ) popupFieldset.appendChild(builder.build()) + // XXX I'm not sure **why** this is needed (as it's set during `this.initialize`) + // but apparently it's needed. + if (!U.Utils.isObject(this.options.remoteData)) { + this.options.remoteData = {} + } + const remoteDataFields = [ [ 'options.remoteData.url', diff --git a/umap/tests/integration/test_collaborative_editing.py b/umap/tests/integration/test_collaborative_editing.py index d441c68e..3f5b0c31 100644 --- a/umap/tests/integration/test_collaborative_editing.py +++ b/umap/tests/integration/test_collaborative_editing.py @@ -5,7 +5,7 @@ from time import sleep from playwright.sync_api import expect -from umap.models import DataLayer, Map +from umap.models import DataLayer from ..base import DataLayerFactory, MapFactory