Skip to content

Commit

Permalink
Make title row of generated CSV file have correct number of columns
Browse files Browse the repository at this point in the history
  • Loading branch information
lucassz committed Jun 14, 2018
1 parent 20578c3 commit 87621fe
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions static/js/vendor/DataTables/datatables.js
Original file line number Diff line number Diff line change
Expand Up @@ -27693,13 +27693,14 @@ DataTable.ext.buttons.csvHtml5 = {
var output_ = _exportData( dt, config ).str;
var data = dt.buttons.exportData( config.exportOptions );
if (data.header[2][0] == 2) {
var str = $('tr:first').text() + '\n'
var output = str + output_
}
else{
var str = $('h1:last').text() + '\n'
var output = str + output_
var str = $('tr:first').text();
}
else {
var str = $('h1:last').text();
}
var commas = (output_.split('\n')[0].match(/,/g) || []).join('');
var output = '"' + str + '"' + commas + '\n' + output_;

var url = window.location.href;
var myRegexp = /(\d+)/g;
var regExp = /\(([^)]+)\)/;
Expand Down

0 comments on commit 87621fe

Please sign in to comment.