From 3272f73d16fc46d093c464ea956968dfb9ecd590 Mon Sep 17 00:00:00 2001 From: mdouchin Date: Thu, 17 Oct 2024 16:29:01 +0200 Subject: [PATCH] lizmap-features-table - improve popup table style --- assets/src/components/FeaturesTable.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/assets/src/components/FeaturesTable.js b/assets/src/components/FeaturesTable.js index 5f41664fe5..efb0d6f1f7 100644 --- a/assets/src/components/FeaturesTable.js +++ b/assets/src/components/FeaturesTable.js @@ -227,6 +227,12 @@ export default class FeaturesTable extends HTMLElement { this.uniqueField, event.target.parentElement.parentElement.querySelector('div.lizmap-features-table-item-popup'), function(aLayerId, aFeature, aTarget) { + // Add bootstrap classes to the popup tables + const popupTable = aTarget.querySelector('table.lizmapPopupTable'); + if (popupTable) { + popupTable.classList.add('table', 'table-condensed', 'table-sm', 'table-bordered', 'table-striped'); + } + // Show popup and hide other children const featuresTableDiv = aTarget.parentElement; if (featuresTableDiv) {