scrollBarWidth : 19, // this is the value used in positioning calculations, it does not actually change the width of the scrollbar
minScrollWidth : 100, // min scroll area width when width of frozen columns exceeds window width
frozenColumns : 0,
- exportWindow : "height=400,width=500,scrollbars=1,menubar=1,resizable=1",
+ exportWindow : "height=400,width=500,scrollbars=1,menubar=1,resizable=1,location=0,toolbar=0,status=0",
exportStyleList : ['background-color','color','text-align','font-weight','font-size','font-family'],
exportImgTags : false, // applies to grid header and to SimpleGrid cells (not LiveGrid cells)
exportFormFields : true,
this.innerDiv = this.createDiv("inner",this.structTabUR);
this.scrollDiv = this.createDiv("scroll",this.structTabLR);
this.resizeDiv = this.createDiv("resize",this.outerDiv,true);
- this.exportDiv = this.createDiv("export",this.outerDiv,true);
this.messagePopup=new Rico.Popup();
this.messagePopup.createContainer({hideOnEscape:false, hideOnClick:false, parent:this.outerDiv});
var exportStyles=this.getExportStyles(this.thead[0]);
//alert(exportStyles.join('\n'));
this.exportRows=[];
- this.exportText="<table border='1' cellspacing='0'>";\r
+ this.exportText="<html><head></head><body><table border='1' cellspacing='0'>";\r
for (c=0; c<this.columns.length; c++) {\r
if (this.columns[c].visible) this.exportText+="<col width='"+parseInt(this.columns[c].colWidth,10)+"'>";
}\r
/**
* Support function for printVisible().
- * exportType is optional and defaults 'plain'; 'owc' can be used for IE users with Office Web Components.
*/
- exportFinish: function(exportType) {
+ exportFinish: function() {
if (this.hideMsg) this.hideMsg();
window.status=Rico.getPhraseById('exportComplete');
if (this.exportRows.length > 0) this.exportText+='<tr>'+this.exportRows.join('</tr><tr>')+'</tr>';
if (this.exportFooter) this.exportText+=this.exportFooter;
- this.exportText+="</tbody></table>";
- this.exportDiv.innerHTML=this.exportText;
+ this.exportText+="</tbody></table></body></html>";
+ if (this.cancelMenu) this.cancelMenu();
+ var w=window.open('','_blank',this.options.exportWindow);
+ if (w == null) {
+ alert(Rico.getPhraseById('disableBlocker'));
+ } else {
+ w.document.open();
+ w.document.write(this.exportText);
+ w.document.close();
+ }
this.exportText=undefined;
this.exportRows=undefined;
- if (this.cancelMenu) this.cancelMenu();
- var w=window.open(Rico.htmDir+'export_'+(exportType || 'plain')+'.html?'+this.exportDiv.id,'',this.options.exportWindow);
- if (w == null) alert(Rico.getPhraseById('disableBlocker'));
},
/**
this.filterType = Rico.ColumnConst.UNFILTERED;
this.hideable = typeof this.format.canHide=='boolean' ? this.format.canHide : liveGrid.options.canHideDefault;
- var wi=(typeof(this.format.width)=='number') ? this.format.width : hdrInfo.initWidth;
+ var wi;
+ switch (typeof this.format.width) {
+ case 'number': wi=this.format.width; break;
+ case 'string': wi=parseInt(this.format.width,10); break;
+ default: wi=hdrInfo.initWidth; break;
+ }
wi=(typeof(wi)=='number') ? Math.max(wi,Rico.ColumnConst.MINWIDTH) : liveGrid.options.defaultWidth;
this.setColWidth(wi);
if (!this.visible) this.setDisplay('none');