From f78e95b0884450783eda345179f398a06392aedd Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Fri, 3 May 2024 16:06:51 +0200 Subject: [PATCH] wip: remove tabs from browser --- umap/static/umap/js/modules/browser.js | 11 ----------- umap/static/umap/js/umap.controls.js | 1 - 2 files changed, 12 deletions(-) diff --git a/umap/static/umap/js/modules/browser.js b/umap/static/umap/js/modules/browser.js index 2c835431..cd1a45ff 100644 --- a/umap/static/umap/js/modules/browser.js +++ b/umap/static/umap/js/modules/browser.js @@ -153,7 +153,6 @@ export default class Browser { DomEvent.disableClickPropagation(container) DomUtil.createTitle(container, translate('Browse data'), 'icon-layers') - this.tabsMenu(container, 'browse') const formContainer = DomUtil.createFieldset(container, L._('Filters'), { on: this.mode === 'filters', }) @@ -196,14 +195,4 @@ export default class Browser { DomEvent.on(button, 'click', map.openBrowser, map) return button } - - tabsMenu(container, active) { - const tabs = L.DomUtil.create('div', 'flat-tabs', container) - const browse = L.DomUtil.add('button', 'flat tab-browse', tabs, L._('Data')) - DomEvent.on(browse, 'click', this.open, this) - const info = L.DomUtil.add('button', 'flat tab-info', tabs, L._('About')) - DomEvent.on(info, 'click', this.map.displayCaption, this.map) - let el = tabs.querySelector(`.tab-${active}`) - L.DomUtil.addClass(el, 'on') - } } diff --git a/umap/static/umap/js/umap.controls.js b/umap/static/umap/js/umap.controls.js index 0cf90bb0..7d2c4cf1 100644 --- a/umap/static/umap/js/umap.controls.js +++ b/umap/static/umap/js/umap.controls.js @@ -665,7 +665,6 @@ const ControlsMixin = { const container = L.DomUtil.create('div', 'umap-caption') L.DomUtil.createTitle(container, this.options.name, 'icon-caption') this.permissions.addOwnerLink('h5', container) - this.browser.tabsMenu(container, 'info') if (this.options.description) { const description = L.DomUtil.element({ tagName: 'div',