From d47c6f3214d528f8c3b83f56aca68ab97f73b116 Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Mon, 27 Nov 2023 22:32:29 +0100 Subject: [PATCH] Always use fullwidth table editor Adding a property when table is not in fullwidth is buguish, so let's make it simple. In the future, we'd replace this table editor with a dedicated lib. cf #1363 --- umap/static/umap/js/umap.tableeditor.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/umap/static/umap/js/umap.tableeditor.js b/umap/static/umap/js/umap.tableeditor.js index abb0f9cc8..04283b499 100644 --- a/umap/static/umap/js/umap.tableeditor.js +++ b/umap/static/umap/js/umap.tableeditor.js @@ -110,13 +110,9 @@ L.U.TableEditor = L.Class.extend({ this.edit() } L.DomEvent.on(addButton, 'click', addProperty, this) - const className = - this.properties.length > 2 - ? 'umap-table-editor fullwidth dark' - : 'umap-table-editor dark' this.datalayer.map.ui.openPanel({ data: { html: this.table }, - className: className, + className: 'umap-table-editor fullwidth dark', actions: [addButton], }) this.datalayer.map.fire('dataload', { id: id })