From 27bc982127f7578f185032bd7877e73500d4763d Mon Sep 17 00:00:00 2001 From: Rob Garrison Date: Tue, 10 Jan 2017 21:49:39 -0600 Subject: [PATCH] Output: remove console.log --- dist/js/widgets/widget-output.min.js | 2 +- js/widgets/widget-output.js | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/dist/js/widgets/widget-output.min.js b/dist/js/widgets/widget-output.min.js index 48201ba1..2d9e96b9 100644 --- a/dist/js/widgets/widget-output.min.js +++ b/dist/js/widgets/widget-output.min.js @@ -1,2 +1,2 @@ /*! Widget: output - updated 1/6/2017 (v2.28.4) */ -!function(a){"use strict";var b=a.tablesorter,c=b.output={event:"outputTable",noDblClick:600,lastEvent:0,busy:!1,regexQuote:/([\n\t\x09\x0d\x0a]|<[^<]+>)/,regexBR:/(|\n)/g,regexIMG:/]+alt\s*=\s*['"]([^'"]+)['"][^>]*>/i,regexHTML:/<[^<]+>/g,replaceCR:"\r\n",replaceTab:"\t",popupTitle:"Output",popupStyle:"width:100%;height:100%;margin:0;resize:none;",message:"Your device does not support downloading. Please try again in desktop browser.",init:function(a){a.$table.off(c.event).on(c.event,function(b){b.stopPropagation(),!c.busy&&b.timeStamp-c.lastEvent>c.noDblClick?(c.lastEvent=b.timeStamp,c.busy=!0,c.process(a,a.widgetOptions)):console.log("blocked",c.busy)})},processRow:function(d,e,f,g){var h,i,j,k,l,m,n,o,p,q,r=d.widgetOptions,s=[],t=r.output_duplicateSpans,u=f&&g&&r.output_headerRows&&a.isFunction(r.output_callbackJSON),v=0,w=e.length;for(k=0;k-1||!e.output_hiddenColumns&&"none"===d.$headerIndexed[o].css("display")&&!d.$headerIndexed[o].hasClass("tablesorter-scroller-hidden-column");if(g=u.children("thead").children("tr").not("."+(b.css.filterRow||"tablesorter-filter-row")).filter(function(){return e.output_hiddenColumns||"none"!==a(this).css("display")}),i=c.processRow(d,g,!0,q),h=u.children("tbody").children("tr").not(d.selectorRemove),h="function"==typeof t?h.filter(t):/^f/.test(t)?h.not("."+(e.filter_filteredRow||"filtered")):/^v/.test(t)?h.filter(":visible"):/^[.#:\[]/.test(t)?h.filter(t):h,j=c.processRow(d,h),e.output_includeFooter&&(j=j.concat(c.processRow(d,u.children("tfoot").children("tr:visible")))),k=i.length,q){for(p=[],l=j.length,o=0;o1&&e.output_headerRows?o%k:k-1],p.push(c.row2Hash(m,j[o]));f=n?JSON.stringify(p):p}else e.output_includeHeader?(m=[i[k>1&&e.output_headerRows?o%k:k-1]],p=c.row2CSV(e,e.output_headerRows?i:m,r).concat(c.row2CSV(e,j,r))):p=c.row2CSV(e,j,r),f=r&&n?JSON.stringify(p):p.join("\n");if(a.isFunction(e.output_callback)){if(m=e.output_callback(d,f,d.pager&&d.pager.ajaxObject.url||null),m===!1)return;"string"==typeof m&&(f=m)}/p/i.test(e.output_delivery||"")?c.popup(f,e.output_popupStyle,q||r):c.download(d,e,f),c.busy=!1},row2CSV:function(a,b,c){var d,e,f=[],g=b.length;for(e=0;e0&&""!==d&&(f[f.length]=c?b[e]:b[e].join(a.output_separator));return f},row2Hash:function(a,b){var c,d={},e=b.length;for(c=0;c"+c.popupTitle+'"),e.document.close(),e.focus()}catch(f){return e.close(),c.popup(a,b,d)}return!0},download:function(a,b,d){if("function"==typeof b.output_savePlugin)return b.output_savePlugin(a,b,d);var e,f,g,h,i=window.navigator,j=document.createElement("a");if(/(iP)/g.test(i.userAgent))return alert(c.message),!1;try{g=!!new Blob}catch(a){g=!1}return g?(window.URL=window.URL||window.webkitURL,h=/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(b.output_encoding)?["\ufeff",d]:[d],f=new Blob(h,{type:b.output_encoding}),i.msSaveBlob?i.msSaveBlob(f,b.output_saveFileName):(j.href=window.URL.createObjectURL(f),j.download=b.output_saveFileName,document.createEvent&&(e=document.createEvent("MouseEvents"),e.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),j.dispatchEvent(e))),!1):(window.open(b.output_encoding+encodeURIComponent(d)+"?download","_self"),!0)},remove:function(a){a.$table.off(c.event)}};b.addWidget({id:"output",options:{output_separator:",",output_ignoreColumns:[],output_hiddenColumns:!1,output_includeFooter:!1,output_includeHeader:!0,output_headerRows:!1,output_dataAttrib:"data-name",output_delivery:"popup",output_saveRows:"filtered",output_duplicateSpans:!0,output_replaceQuote:"“;",output_includeHTML:!1,output_trimSpaces:!0,output_wrapQuotes:!1,output_popupStyle:"width=500,height=300",output_saveFileName:"mytable.csv",output_formatContent:null,output_callback:function(a,b){return!0},output_callbackJSON:function(a,b,c){return b+"("+c+")"},output_encoding:"data:application/octet-stream;charset=utf8,",output_savePlugin:null},init:function(a,b,d){c.init(d)},remove:function(a,b){c.remove(b)}})}(jQuery); \ No newline at end of file +!function(a){"use strict";var b=a.tablesorter,c=b.output={event:"outputTable",noDblClick:600,lastEvent:0,busy:!1,regexQuote:/([\n\t\x09\x0d\x0a]|<[^<]+>)/,regexBR:/(|\n)/g,regexIMG:/]+alt\s*=\s*['"]([^'"]+)['"][^>]*>/i,regexHTML:/<[^<]+>/g,replaceCR:"\r\n",replaceTab:"\t",popupTitle:"Output",popupStyle:"width:100%;height:100%;margin:0;resize:none;",message:"Your device does not support downloading. Please try again in desktop browser.",init:function(a){a.$table.off(c.event).on(c.event,function(b){b.stopPropagation(),!c.busy&&b.timeStamp-c.lastEvent>c.noDblClick&&(c.lastEvent=b.timeStamp,c.busy=!0,c.process(a,a.widgetOptions))})},processRow:function(d,e,f,g){var h,i,j,k,l,m,n,o,p,q,r=d.widgetOptions,s=[],t=r.output_duplicateSpans,u=f&&g&&r.output_headerRows&&a.isFunction(r.output_callbackJSON),v=0,w=e.length;for(k=0;k-1||!e.output_hiddenColumns&&"none"===d.$headerIndexed[o].css("display")&&!d.$headerIndexed[o].hasClass("tablesorter-scroller-hidden-column");if(g=u.children("thead").children("tr").not("."+(b.css.filterRow||"tablesorter-filter-row")).filter(function(){return e.output_hiddenColumns||"none"!==a(this).css("display")}),i=c.processRow(d,g,!0,q),h=u.children("tbody").children("tr").not(d.selectorRemove),h="function"==typeof t?h.filter(t):/^f/.test(t)?h.not("."+(e.filter_filteredRow||"filtered")):/^v/.test(t)?h.filter(":visible"):/^[.#:\[]/.test(t)?h.filter(t):h,j=c.processRow(d,h),e.output_includeFooter&&(j=j.concat(c.processRow(d,u.children("tfoot").children("tr:visible")))),k=i.length,q){for(p=[],l=j.length,o=0;o1&&e.output_headerRows?o%k:k-1],p.push(c.row2Hash(m,j[o]));f=n?JSON.stringify(p):p}else e.output_includeHeader?(m=[i[k>1&&e.output_headerRows?o%k:k-1]],p=c.row2CSV(e,e.output_headerRows?i:m,r).concat(c.row2CSV(e,j,r))):p=c.row2CSV(e,j,r),f=r&&n?JSON.stringify(p):p.join("\n");if(a.isFunction(e.output_callback)){if(m=e.output_callback(d,f,d.pager&&d.pager.ajaxObject.url||null),m===!1)return;"string"==typeof m&&(f=m)}/p/i.test(e.output_delivery||"")?c.popup(f,e.output_popupStyle,q||r):c.download(d,e,f),c.busy=!1},row2CSV:function(a,b,c){var d,e,f=[],g=b.length;for(e=0;e0&&""!==d&&(f[f.length]=c?b[e]:b[e].join(a.output_separator));return f},row2Hash:function(a,b){var c,d={},e=b.length;for(c=0;c"+c.popupTitle+'"),e.document.close(),e.focus()}catch(f){return e.close(),c.popup(a,b,d)}return!0},download:function(a,b,d){if("function"==typeof b.output_savePlugin)return b.output_savePlugin(a,b,d);var e,f,g,h,i=window.navigator,j=document.createElement("a");if(/(iP)/g.test(i.userAgent))return alert(c.message),!1;try{g=!!new Blob}catch(a){g=!1}return g?(window.URL=window.URL||window.webkitURL,h=/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(b.output_encoding)?["\ufeff",d]:[d],f=new Blob(h,{type:b.output_encoding}),i.msSaveBlob?i.msSaveBlob(f,b.output_saveFileName):(j.href=window.URL.createObjectURL(f),j.download=b.output_saveFileName,document.createEvent&&(e=document.createEvent("MouseEvents"),e.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),j.dispatchEvent(e))),!1):(window.open(b.output_encoding+encodeURIComponent(d)+"?download","_self"),!0)},remove:function(a){a.$table.off(c.event)}};b.addWidget({id:"output",options:{output_separator:",",output_ignoreColumns:[],output_hiddenColumns:!1,output_includeFooter:!1,output_includeHeader:!0,output_headerRows:!1,output_dataAttrib:"data-name",output_delivery:"popup",output_saveRows:"filtered",output_duplicateSpans:!0,output_replaceQuote:"“;",output_includeHTML:!1,output_trimSpaces:!0,output_wrapQuotes:!1,output_popupStyle:"width=500,height=300",output_saveFileName:"mytable.csv",output_formatContent:null,output_callback:function(a,b){return!0},output_callbackJSON:function(a,b,c){return b+"("+c+")"},output_encoding:"data:application/octet-stream;charset=utf8,",output_savePlugin:null},init:function(a,b,d){c.init(d)},remove:function(a,b){c.remove(b)}})}(jQuery); \ No newline at end of file diff --git a/js/widgets/widget-output.js b/js/widgets/widget-output.js index 43c93697..8e3078fa 100644 --- a/js/widgets/widget-output.js +++ b/js/widgets/widget-output.js @@ -51,8 +51,6 @@ // explicitly use table.config.widgetOptions because we want // the most up-to-date values; not the 'wo' from initialization output.process(c, c.widgetOptions); - } else { - console.log('blocked', output.busy); } }); },