Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add export started message when exporting data #3913

Merged
merged 1 commit into from
Oct 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion assets/src/legacy/attributeTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ var lizAttributeTable = function() {
// Export tools
if ( 'exportLayers' in config.options && config.options.exportLayers == 'True' ) {
html+= '&nbsp;<div class="export-formats btn-group pull-right" role="group" >';
html+= ' <button type="button" class="btn btn-mini dropdown-toggle" data-toggle="dropdown" aria-expanded="false">';
html+= ' <button type="button" class="btn btn-mini dropdown-toggle exportLayer" data-toggle="dropdown" aria-expanded="false">';
html+= lizDict['attributeLayers.toolbar.btn.data.export.title'];
html+= ' <span class="caret"></span>';
html+= ' </button>';
Expand Down
7 changes: 6 additions & 1 deletion assets/src/legacy/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -3893,7 +3893,12 @@ window.lizMap = function() {
getFeatureUrlData['options']['OUTPUTFORMAT'] = eformat;

// Download file
Utils.downloadFile(getFeatureUrlData['url'], getFeatureUrlData['options']);
document.querySelectorAll('.exportLayer').forEach(el => el.disabled = true);
mAddMessage(lizDict['layer.export.started'], 'info', true).addClass('export-in-progress');
Utils.downloadFile(getFeatureUrlData['url'], getFeatureUrlData['options'], () => {
document.querySelectorAll('.exportLayer').forEach(el => el.disabled = false);
document.querySelector('#message .export-in-progress a').click();
});

return false;
}
Expand Down
2 changes: 1 addition & 1 deletion assets/src/legacy/switcher-layers-actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,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 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,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?
Expand Down
Loading