Ero sivun ”Widget:JwObsCharts” versioiden välillä
Järvi-meriwikistä
Rivi 43: | Rivi 43: | ||
memo.graphType = jQuery( this ).attr( 'data-graph-type' ); | memo.graphType = jQuery( this ).attr( 'data-graph-type' ); | ||
memo.editUrl = jQuery( this ).attr( 'data-edit-url' ); if (typeof memo.editUrl == 'undefined') { memo.editUrl = '-'; } | memo.editUrl = jQuery( this ).attr( 'data-edit-url' ); if (typeof memo.editUrl == 'undefined') { memo.editUrl = '-'; } | ||
+ | memo.csvfile = jQuery( this ).attr( 'data-csv-filename' ); if (typeof memo.csvfile == 'undefined') { memo.csvfilename = i18n[ memo.obscode ].title[ memo.lang ] + '_SiteID-' memo.siteid + '_Downloaded-' + today.toISOString().split( 'T' )[0] + '.csv'; } | ||
if ( typeof jQuery( this ).attr( 'data-maintainer' ) == 'undefined' ) { memo.maintainerShow = false; } | if ( typeof jQuery( this ).attr( 'data-maintainer' ) == 'undefined' ) { memo.maintainerShow = false; } | ||
else { memo.maintainerShow = ( jQuery( this ).attr( 'data-maintainer' ).toLowerCase() == 'true' ); } | else { memo.maintainerShow = ( jQuery( this ).attr( 'data-maintainer' ).toLowerCase() == 'true' ); } | ||
Rivi 1 190: | Rivi 1 191: | ||
csv = header + csv; | csv = header + csv; | ||
//console.log( csv ); | //console.log( csv ); | ||
− | var exportedFilename = | + | var exportedFilename = memo.csvfile; |
var blob = new Blob( [csv], { type: 'text/csv;charset=utf-16LE;' }); | var blob = new Blob( [csv], { type: 'text/csv;charset=utf-16LE;' }); |