diff --git a/umap/static/umap/js/modules/importer.js b/umap/static/umap/js/modules/importer.js index 76bb53b8..53dd896c 100644 --- a/umap/static/umap/js/modules/importer.js +++ b/umap/static/umap/js/modules/importer.js @@ -128,7 +128,7 @@ export default class Importer { this.container = DomUtil.create('div', 'umap-upload') this.container.innerHTML = TEMPLATE if (this.IMPORTERS.length) { - for (const plugin of this.IMPORTERS) { + for (const plugin of this.IMPORTERS.sort((a, b) => (a.id > b.id ? 1 : -1))) { L.DomUtil.createButton( plugin.id, this.container.querySelector('#importers'), diff --git a/umap/static/umap/js/modules/importers/communesfr.js b/umap/static/umap/js/modules/importers/communesfr.js index 7b08252b..055d4ecf 100644 --- a/umap/static/umap/js/modules/importers/communesfr.js +++ b/umap/static/umap/js/modules/importers/communesfr.js @@ -10,7 +10,6 @@ class Autocomplete extends SingleMixin(BaseAjax) { } } - export class Importer { constructor(map, options) { this.name = options.name || 'Communes' diff --git a/umap/static/umap/js/modules/importers/datasets.js b/umap/static/umap/js/modules/importers/datasets.js index 10445644..7742ebe0 100644 --- a/umap/static/umap/js/modules/importers/datasets.js +++ b/umap/static/umap/js/modules/importers/datasets.js @@ -10,7 +10,7 @@ export class Importer { async open(importer) { const container = DomUtil.create('div', 'formbox') - DomUtil.element({tagName: 'h3', textContent: this.name, parent: container}) + DomUtil.element({ tagName: 'h3', textContent: this.name, parent: container }) const select = DomUtil.create('select', '', container) const noPreset = DomUtil.element({ tagName: 'option', diff --git a/umap/static/umap/js/modules/importers/geodatamine.js b/umap/static/umap/js/modules/importers/geodatamine.js index acfdd049..051a8bbb 100644 --- a/umap/static/umap/js/modules/importers/geodatamine.js +++ b/umap/static/umap/js/modules/importers/geodatamine.js @@ -74,7 +74,9 @@ export class Importer { }) const confirm = () => { if (!boundary || !select.value) { - this.map.alert.open({content: translate('Please choose a theme and a boundary first.')}) + this.map.alert.open({ + content: translate('Please choose a theme and a boundary first.'), + }) return } importer.url = `${this.baseUrl}/data/${select.value}/${boundary}?format=geojson&aspoint=${asPoint.checked}` diff --git a/umap/static/umap/js/modules/importers/overpass.js b/umap/static/umap/js/modules/importers/overpass.js index 58fe5e42..6c28f62b 100644 --- a/umap/static/umap/js/modules/importers/overpass.js +++ b/umap/static/umap/js/modules/importers/overpass.js @@ -60,7 +60,9 @@ export class Importer { const confirm = () => { let tags = container.querySelector('[name=tags]').value if (!tags) { - this.map.alert.open({content: translate('Please define an expression for the query first')}) + this.map.alert.open({ + content: translate('Please define an expression for the query first'), + }) return } const outMode = container.querySelector('[name=out-mode]').value