From 651ea8709756679140d88f5eebec76c73c0508b1 Mon Sep 17 00:00:00 2001 From: Travis Clarke Date: Mon, 1 May 2017 22:48:46 -0700 Subject: [PATCH] implement "getType" --- src/stable/js/tableexport.js | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/src/stable/js/tableexport.js b/src/stable/js/tableexport.js index c0e7d60..3214c9a 100644 --- a/src/stable/js/tableexport.js +++ b/src/stable/js/tableexport.js @@ -99,9 +99,15 @@ break; } } - return new Array(total).concat($(val).text()); + return new Array(total).concat({ + v: formatValue(val.textContent), + t: getType(val.className) + }); } - return formatValue(val.textContent); + return { + v: formatValue(val.textContent), + t: getType(val.className) + }; }); }), dataObject = TableExport.prototype.escapeHtml( @@ -150,9 +156,15 @@ break; } } - return new Array(total).concat($(val).text()); + return new Array(total).concat({ + v: formatValue(val.textContent), + t: getType(val.className) + }); } - return formatValue(val.textContent); + return { + v: formatValue(val.textContent), + t: getType(val.className) + }; }); }), dataObject = TableExport.prototype.escapeHtml( @@ -180,7 +192,10 @@ if (_hasClass(val, emptyCSS)) { return " " } - return formatValue(val.textContent); + return { + v: formatValue(val.textContent), + t: getType(val.className) + }; }).join(colD); }).join(rdel), dataObject = TableExport.prototype.escapeHtml(