@@ -31,7 +31,8 @@ THE SOFTWARE.*/
3131 pdfFontSize :14 ,
3232 pdfLeftMargin :20 ,
3333 escape :'true' ,
34- htmlContent :'false'
34+ htmlContent :'false' ,
35+ consoleLog :'true'
3536 } ;
3637
3738 var options = $ . extend ( defaults , options ) ;
@@ -70,7 +71,9 @@ THE SOFTWARE.*/
7071 } ) ;
7172
7273 //output
73- //console.log(tdData);
74+ if ( defaults . consoleLog == 'true' ) {
75+ console . log ( tdData ) ;
76+ }
7477 var base64data = "base64," + $ . base64 . encode ( tdData ) ;
7578 window . open ( 'data:application/' + defaults . type + ';filename=exportData;' + base64data ) ;
7679 } else if ( defaults . type == 'sql' ) {
@@ -110,6 +113,11 @@ THE SOFTWARE.*/
110113
111114 //output
112115 //console.log(tdData);
116+
117+ if ( defaults . consoleLog == 'true' ) {
118+ console . log ( tdData ) ;
119+ }
120+
113121 var base64data = "base64," + $ . base64 . encode ( tdData ) ;
114122 window . open ( 'data:application/sql;filename=exportData;' + base64data ) ;
115123
@@ -156,7 +164,9 @@ THE SOFTWARE.*/
156164
157165 //Return as Array
158166 //console.log(jsonExportArray);
159-
167+ if ( defaults . consoleLog == 'true' ) {
168+ console . log ( JSON . stringify ( jsonExportArray ) ) ;
169+ }
160170 var base64data = "base64," + $ . base64 . encode ( JSON . stringify ( jsonExportArray ) ) ;
161171 window . open ( 'data:application/json;filename=exportData;' + base64data ) ;
162172 } else if ( defaults . type == 'xml' ) {
@@ -194,7 +204,10 @@ THE SOFTWARE.*/
194204 } ) ;
195205 xml += '</data></tabledata>'
196206
197- //console.log(xml);
207+ if ( defaults . consoleLog == 'true' ) {
208+ console . log ( xml ) ;
209+ }
210+
198211 var base64data = "base64," + $ . base64 . encode ( xml ) ;
199212 window . open ( 'data:application/xml;filename=exportData;' + base64data ) ;
200213
@@ -234,7 +247,9 @@ THE SOFTWARE.*/
234247 } ) ;
235248 excel += '</table>'
236249
237- //console.log(excel);
250+ if ( defaults . consoleLog == 'true' ) {
251+ console . log ( excel ) ;
252+ }
238253
239254 var excelFile = "<html xmlns:o='urn:schemas-microsoft-com:office:office' xmlns:x='urn:schemas-microsoft-com:office:" + defaults . type + "' xmlns='http://www.w3.org/TR/REC-html40'>" ;
240255 excelFile += "<head>" ;
@@ -333,6 +348,8 @@ THE SOFTWARE.*/
333348 content_data = escape ( content_data ) ;
334349 }
335350
351+
352+
336353 return content_data ;
337354 }
338355
0 commit comments