diff --git a/assets/src/legacy/attributeTable.js b/assets/src/legacy/attributeTable.js index f3a19946ec..171f0ab23e 100644 --- a/assets/src/legacy/attributeTable.js +++ b/assets/src/legacy/attributeTable.js @@ -536,7 +536,7 @@ var lizAttributeTable = function() { // Export tools if ( 'exportLayers' in config.options && config.options.exportLayers == 'True' ) { html+= ' 
'; - html+= ' '; diff --git a/assets/src/legacy/map.js b/assets/src/legacy/map.js index 97a96e9128..883ffcb0da 100644 --- a/assets/src/legacy/map.js +++ b/assets/src/legacy/map.js @@ -4956,7 +4956,12 @@ window.lizMap = function() { getFeatureUrlData['options']['OUTPUTFORMAT'] = eformat; // Download file - downloadFile(getFeatureUrlData['url'], getFeatureUrlData['options']); + document.querySelectorAll('.exportLayer').forEach(el => el.disabled = true); + mAddMessage(lizDict['layer.export.started'], 'info', true).addClass('export-in-progress'); + downloadFile(getFeatureUrlData['url'], getFeatureUrlData['options'], () => { + document.querySelectorAll('.exportLayer').forEach(el => el.disabled = false); + document.querySelector('#message .export-in-progress a').click(); + }); return false; } diff --git a/assets/src/legacy/switcher-layers-actions.js b/assets/src/legacy/switcher-layers-actions.js index f54b5977f0..7d3aac44c8 100644 --- a/assets/src/legacy/switcher-layers-actions.js +++ b/assets/src/legacy/switcher-layers-actions.js @@ -473,7 +473,7 @@ var lizLayerActionButtons = function() { // Export - $('#content').on('click', 'button.exportLayer', function(){ + $('#sub-dock').on('click', 'button.exportLayer', function(){ var eName = $(this).val(); var eFormat = $(this).parent().find('select.exportLayer').val(); lizMap.exportVectorLayer( eName, eFormat ); diff --git a/lizmap/modules/view/locales/en_US/dictionnary.UTF-8.properties b/lizmap/modules/view/locales/en_US/dictionnary.UTF-8.properties index f571633447..8f50be888d 100644 --- a/lizmap/modules/view/locales/en_US/dictionnary.UTF-8.properties +++ b/lizmap/modules/view/locales/en_US/dictionnary.UTF-8.properties @@ -115,6 +115,7 @@ layer.metadata.opacity.title=Opacity layer.export.right.required=Right is required to export layer. layer.export.unknown.export.error=The server reported an error 400 during the export of the layer. +layer.export.started=Export started, please wait... geobookmark.name.required=A name is required to create a bookmark. geobookmark.confirm.delete=Are you sure you want to delete this bookmark?