Subversion Repositories munaweb

Rev

Rev 19 | Rev 32 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 19 Rev 25
Line 536... Line 536...
536
	}
536
	}
537
	return '';
537
	return '';
538
}
538
}
539
 
539
 
540
function exportTableToCSV(tablename, filename) {
540
function exportTableToCSV(tablename, filename) {
541
    var csv = [];
541
    var csv = ["\uFEFF"];
542
    var rows = document.getElementById(tablename).querySelectorAll("table tr");
542
    var rows = document.getElementById(tablename).querySelectorAll("table tr");
543
    var dq = '"';
543
    var dq = '"';
544
    var nq = "'";
544
    var nq = "'";
545
 
545
 
546
    for (var i = 0; i < rows.length; i++) {
546
    for (var i = 0; i < rows.length; i++) {
Line 570... Line 570...
570
function downloadCSV(csv, filename) {
570
function downloadCSV(csv, filename) {
571
    var csvFile;
571
    var csvFile;
572
    var downloadLink;
572
    var downloadLink;
573
 
573
 
574
    // CSV file
574
    // CSV file
575
    csvFile = new Blob([csv], {type: "text/csv"});
575
    csvFile = new Blob([csv], {type: "text/csv;charset=utf-8"});
576
 
576
 
577
    // Download link
577
    // Download link
578
    downloadLink = document.createElement("a");
578
    downloadLink = document.createElement("a");
579
 
579
 
580
    // File name
580
    // File name