CC-3979: Playout History export should include date range in file and/or

filename

- fix
This commit is contained in:
James 2012-06-20 16:47:11 -04:00
parent 6a75fd6c76
commit e40d9731a2
1 changed files with 20 additions and 10 deletions

View File

@ -1,20 +1,30 @@
function getFileName(){ function getFileName(ext){
var filename = $("#his_date_start").val()+"_"+$("#his_time_start").val()+"m--"+$("#his_date_end").val()+"_"+$("#his_time_end").val()+"m" var filename = $("#his_date_start").val()+"_"+$("#his_time_start").val()+"m--"+$("#his_date_end").val()+"_"+$("#his_time_end").val()+"m"
filename = filename.replace(/:/g,"h") filename = filename.replace(/:/g,"h")
if(ext == "pdf"){
filename = filename+".pdf"
}else{
filename = filename+".csv"
}
return filename; return filename;
} }
function setFlashFileName( nButton, oConfig, oFlash ) { function setFlashFileName( nButton, oConfig, oFlash ) {
var filename = getFileName() var filename = getFileName(oConfig.sExtends)
oFlash.setFileName( filename ); oFlash.setFileName( filename );
this.fnSetText( oFlash, if(oConfig.sExtends == "pdf"){
"title:"+ this.fnGetTitle(oConfig) +"\n"+ this.fnSetText( oFlash,
"message:"+ oConfig.sPdfMessage +"\n"+ "title:"+ this.fnGetTitle(oConfig) +"\n"+
"colWidth:"+ this.fnCalcColRatios(oConfig) +"\n"+ "message:"+ oConfig.sPdfMessage +"\n"+
"orientation:"+ oConfig.sPdfOrientation +"\n"+ "colWidth:"+ this.fnCalcColRatios(oConfig) +"\n"+
"size:"+ oConfig.sPdfSize +"\n"+ "orientation:"+ oConfig.sPdfOrientation +"\n"+
"--/TableToolsOpts--\n" + "size:"+ oConfig.sPdfSize +"\n"+
this.fnGetTableData(oConfig)); "--/TableToolsOpts--\n" +
this.fnGetTableData(oConfig));
}else{
this.fnSetText( oFlash,
this.fnGetTableData(oConfig));
}
} }
var AIRTIME = (function(AIRTIME) { var AIRTIME = (function(AIRTIME) {