also set filename on csv download link

This commit is contained in:
Oliver Gorwits
2013-09-20 20:00:46 +01:00
parent 26b47d1296
commit e44f203f47

View File

@@ -5,9 +5,10 @@
var query = $(form).serialize(); var query = $(form).serialize();
if (show == '1') { if (show == '1') {
$('#nd_csv-download').attr('href', $('#nd_csv-download')
'/ajax/content/' + type + '/' + tab + '?' + query); .attr('href', '/ajax/content/' + type + '/' + tab + '?' + query)
$('#nd_csv-download').show(); .attr('download', 'netdisco-' + type + '-' + tab + '.csv')
.show();
} }
else { else {
$('#nd_csv-download').hide(); $('#nd_csv-download').hide();