Removing TableTools

This commit is contained in:
Zachary Klosko 2020-12-30 22:16:07 -05:00
parent fdf1f1e918
commit eb9bbb00a5
29 changed files with 2 additions and 4016 deletions

View file

@ -7,46 +7,10 @@ var AIRTIME = (function(AIRTIME) {
mod = AIRTIME.history;
var $historyContentDiv;
var oTableTools = {
"sSwfPath": baseUrl+"js/datatables/plugin/TableTools-2.1.5/swf/copy_csv_xls_pdf.swf",
"aButtons": [
{
"sExtends": "copy",
"fnComplete": function(nButton, oConfig, oFlash, text) {
var lines = text.split('\n').length,
len = this.s.dt.nTFoot === null ? lines-1 : lines-2,
plural = (len==1) ? "" : "s";
alert(sprintf($.i18n._('Copied %s row%s to the clipboard'), len, plural));
},
//set because only the checkbox row is not sortable.
"mColumns": "sortable"
},
{
"sExtends": "csv",
"fnClick": setFlashFileName,
//set because only the checkbox row is not sortable.
"mColumns": "sortable"
},
{
"sExtends": "pdf",
"fnClick": setFlashFileName,
"sPdfOrientation": "landscape",
//set because only the checkbox row is not sortable.
"mColumns": "sortable"
},
{
"sExtends": "print",
"sInfo" : sprintf($.i18n._("%sPrint view%sPlease use your browser's print function to print this table. Press escape when finished."), "<h6>", "</h6><p>"),
//set because only the checkbox row is not sortable.
"mColumns": "sortable"
}
]
};
var lengthMenu = [[10, 25, 50, 100, 500, -1], [10, 25, 50, 100, 500, $.i18n._("All")]];
var sDom = 'l<"dt-process-rel"r><"H"T><"dataTables_scrolling"t><"F"ip>';
var sDom = 'l<"dt-process-rel"r><"H"><"dataTables_scrolling"t><"F"ip>';
var selectedLogItems = {};
@ -155,25 +119,6 @@ var AIRTIME = (function(AIRTIME) {
}
return filename;
}
function setFlashFileName( nButton, oConfig, oFlash ) {
var filename = getFileName(oConfig.sExtends);
oFlash.setFileName( filename );
if (oConfig.sExtends == "pdf") {
this.fnSetText( oFlash,
"title:"+ this.fnGetTitle(oConfig) +"\n"+
"message:"+ oConfig.sPdfMessage +"\n"+
"colWidth:"+ this.fnCalcColRatios(oConfig) +"\n"+
"orientation:"+ oConfig.sPdfOrientation +"\n"+
"size:"+ oConfig.sPdfSize +"\n"+
"--/TableToolsOpts--\n" +
this.fnGetTableData(oConfig));
}
else {
this.fnSetText(oFlash, this.fnGetTableData(oConfig));
}
}
/* This callback can be used for all history tables */
function fnServerData( sSource, aoData, fnCallback ) {
@ -357,7 +302,6 @@ var AIRTIME = (function(AIRTIME) {
"bJQueryUI": true,
"bAutoWidth": true,
"sDom": sDom,
"oTableTools": oTableTools
});
oTable.fnSetFilteringDelay(350);
@ -430,7 +374,6 @@ var AIRTIME = (function(AIRTIME) {
"bJQueryUI": true,
"bAutoWidth": true,
"sDom": sDom,
"oTableTools": oTableTools
});
oTable.fnSetFilteringDelay(350);