this.container=Rico.$(c);
if(this.options.position=="auto"){this.position=Rico.getStyle(this.container,"position").toLowerCase()
}else{this.position=this.container.style.position=this.options.position
-}if(this.position!="absolute"){this.content=this.container;
-return
-}if(this.options.zIndex>=0){this.container.style.zIndex=this.options.zIndex
+}this.content=document.createElement("div");
+while(this.container.firstChild){this.content.appendChild(this.container.firstChild)
+}this.container.appendChild(this.content);
+this.content.className="RicoPopupContent";
+this.content.style.position="relative";
+if(this.position!="absolute"){return
}if(this.options.closeFunc){this.closeFunc=this.options.closeFunc
}else{var a=this;
this.closeFunc=function(){a.closePopup()
}this.container.style.top="0px";
this.container.style.left="0px";
this.container.style.display="none";
-this.content=document.createElement("div");
-while(this.container.firstChild){this.content.appendChild(this.container.firstChild)
-}this.container.appendChild(this.content);
-this.content.className="RicoPopupContent";
-this.content.style.position="relative";
+if(this.options.zIndex>=0){this.container.style.zIndex=this.options.zIndex
+}this.content.style.zIndex=2;
if(Rico.isIE&&Rico.ieVersion<7){this.ifr=document.createElement("iframe");
-this.ifr.style.position="absolute";
-this.ifr.style.top="0px";
-this.ifr.style.left="0px";
-this.ifr.style.width="2000px";
-this.ifr.style.height="2000px";
-this.ifr.style.zIndex=-1;
+this.ifr.className="RicoShim";
this.ifr.frameBorder=0;
-this.ifr.src="javascript:false;";
-this.content.appendChild(this.ifr)
+this.ifr.src="javascript:'';";
+this.container.appendChild(this.ifr)
}Rico.applyShadow(this.container,this.options.shadow);
if(this.options.hideOnClick){Rico.eventBind(document,"click",Rico.eventHandle(this,"_docClick"))
}this.dragEnabled=false;
},_endDrag:function(){this.container.style.cursor="";
Rico.eventUnbind(document,"mousemove",this.dragHandler);
Rico.eventUnbind(document,"mouseup",this.dropHandler)
-},openPopup:function(b,a){this.container.style.display=this.position=="absolute"?"block":Rico.isIE&&Rico.ieVersion<8?"inline":"inline-block";
-if(typeof b=="number"){this.container.style.left=b+"px"
+},openPopup:function(b,a){if(typeof b=="number"){this.container.style.left=b+"px"
}if(typeof a=="number"){this.container.style.top=a+"px"
-}if(this.container.id){Rico.log("openPopup "+this.container.id+" at "+b+","+a)
+}this.container.style.display="";
+if(this.container.id){Rico.log("openPopup "+this.container.id+" at "+b+","+a)
}Rico._AddOpenPopup(this)
},centerPopup:function(){this.openPopup();
var d=this.container.offsetWidth;
}if(a.overflow){this.contentDiv.style.overflow=a.overflow
}Rico.addClass(this.content,"ricoWindow");
if(Rico.theme.dialog){Rico.addClass(this.content,Rico.theme.dialog)
-}if(Rico.isIE){this.titleDiv.style.zoom=1;
-this.contentDiv.style.zoom=1
}this.content=this.contentDiv
},setTitle:function(a){this.titleContent.innerHTML=a
}};
Rico.setStyle(f,{position:"absolute",top:"2px"});
f.style[d]="0px";
c.RicoSubmenu=e;
-Rico.eventBind(c,"mouseover",Rico.eventHandle(this,"showSubMenu"));
-Rico.eventBind(c,"mouseout",Rico.eventHandle(this,"subMenuOut"))
+Rico.eventBind(c,"mouseover",Rico.eventHandle(this,"showSubMenu"))
},showSubMenu:function(c){if(this.openSubMenu){this.hideSubMenu()
}var b=Rico.eventElement(c);
if(!b.RicoSubmenu){b=b.parentNode
if(Rico.hasClass(b,"ricoSubMenu")){Rico.removeClass(b,"ricoSubMenu");
Rico.addClass(b,"ricoSubMenuOpen")
}b.RicoSubmenu.openmenu(parseInt(this.container.style.left)+b.offsetWidth,parseInt(this.container.style.top)+b.offsetTop,b.offsetWidth-2,b.offsetHeight+2,true)
-},subMenuOut:function(d){if(!this.openSubMenu){return
-}Rico.eventStop(d);
-var c=Rico.eventElement(d);
-var a=Rico.eventRelatedTarget(d)||d.toElement;
-try{while(a!=null&&a!=this.openSubMenu.div){a=a.parentNode
-}}catch(b){}if(a==this.openSubMenu.div){return
-}this.hideSubMenu()
},hideSubMenu:function(){if(this.openMenuAnchor){Rico.removeClass(this.openMenuAnchor,"ricoSubMenuOpen");
Rico.addClass(this.openMenuAnchor,"ricoSubMenu");
this.openMenuAnchor=null
},mouseOver:function(b){if(this.highlightElem&&this.highlightElem.className=="enabled-hover"){this.highlightElem.className="enabled";
this.highlightElem=null
}var a=Rico.eventElement(b);
-if(this.openMenuAnchor&&this.openMenuAnchor!=a){this.hideSubMenu()
+if(a.parentNode==this.openMenuAnchor){a=a.parentNode
+}if(this.openMenuAnchor&&this.openMenuAnchor!=a){this.hideSubMenu()
}if(a.className=="enabled"){a.className="enabled-hover";
this.highlightElem=a
}},mouseOut:function(b){var a=Rico.eventElement(b);
}},addHoliday:function(f,a,g,e,c,b){this.Holidays[this.holidayKey(g,a-1,f)]={desc:e,txtColor:b,bgColor:c||"#DDF"}
},holidayKey:function(c,a,b){return"h"+Rico.zFill(c,4)+Rico.zFill(a,2)+Rico.zFill(b,2)
},atLoad:function(){Rico.log("Calendar#atLoad: "+this.id);
-this.createContainer();
-this.container.id=this.id;
-Rico.addClass(this.container,Rico.theme.calendar||"ricoCalContainer");
+var e=Rico.$(this.id);
+if(e){this.setDiv(e)
+}else{this.createContainer();
+this.container.id=this.id
+}Rico.addClass(this.content,Rico.theme.calendar||"ricoCalContainer");
+this.content.style.display="block";
this.maintab=document.createElement("table");
this.maintab.cellSpacing=2;
this.maintab.cellPadding=0;
this.maintab.className="ricoCalTab";
if(Rico.theme.calendarTable){Rico.addClass(this.maintab,Rico.theme.calendarTable)
}this.tbody=Rico.getTBody(this.maintab);
-var b,n,m,k,h,l,p,o,q,f;
+var d,l,h,g,k,n,m,o,f;
this.colStart=this.options.showWeekNumber?1:0;
-for(k=0;
-k<7;
-k++){b=this.tbody.insertRow(-1);
-b.className="row"+k;
-for(n=0;
-n<7+this.colStart;
-n++){b.insertCell(-1)
-}}b=this.tbody.rows[0];
-b.className="ricoCalDayNames";
-if(this.options.showWeekNumber){b.cells[0].innerHTML=this.weekString;
-for(k=0;
-k<7;
-k++){this.tbody.rows[k].cells[0].className="ricoCalWeekNum"
+for(h=0;
+h<7;
+h++){d=this.tbody.insertRow(-1);
+d.className="row"+h;
+for(l=0;
+l<7+this.colStart;
+l++){d.insertCell(-1)
+}}d=this.tbody.rows[0];
+d.className="ricoCalDayNames";
+if(this.options.showWeekNumber){d.cells[0].innerHTML=this.weekString;
+for(h=0;
+h<7;
+h++){this.tbody.rows[h].cells[0].className="ricoCalWeekNum"
}}this.styles=[];
-for(k=0;
-k<7;
-k++){p=(k+this.options.startAt)%7;
-b.cells[k+this.colStart].innerHTML=Rico.dayAbbr(p);
-this.styles[k]="ricoCal"+p
-}this.thead=this.maintab.createTHead();
-b=this.thead.insertRow(-1);
-n=b.appendChild(document.createElement("th"));
-n.colSpan=7+this.colStart;
-m=n.appendChild(document.createElement("div"));
-m.className=Rico.theme.calendarHeading||"RicoCalHeading";
-m.appendChild(this._createTitleSection("Month"));
-m.appendChild(this._createTitleSection("Year"));
-new Rico.HoverSet(m.getElementsByTagName("a"));
+for(h=0;
+h<7;
+h++){n=(h+this.options.startAt)%7;
+d.cells[h+this.colStart].innerHTML=Rico.dayAbbr(n);
+this.styles[h]="ricoCal"+n
+}this.heading=this.content.appendChild(document.createElement("div"));
+this.heading.className="RicoCalHeading";
+if(Rico.theme.calendarHeading){Rico.addClass(this.heading,Rico.theme.calendarHeading)
+}var b=this.heading.appendChild(document.createElement("div"));
+b.className="RicoCalHeadingInner";
+b.appendChild(this._createTitleSection("Month"));
+b.appendChild(this._createTitleSection("Year"));
+new Rico.HoverSet(this.heading.getElementsByTagName("a"));
new Rico.HoverSet(this.tbody.getElementsByTagName("td"),{hoverNodes:function(a){return a.innerHTML.match(/^\d+$/)?[a]:[]
}});
-m.appendChild(Rico.closeButton(Rico.eventHandle(this,"close")));
-if(this.options.showToday){this.tfoot=this.maintab.createTFoot();
-b=this.tfoot.insertRow(-1);
-this.todayCell=b.insertCell(-1);
+if(this.position=="absolute"){this.heading.appendChild(Rico.closeButton(Rico.eventHandle(this,"close")))
+}if(this.options.showToday){this.tfoot=this.maintab.createTFoot();
+d=this.tfoot.insertRow(-1);
+this.todayCell=d.insertCell(-1);
this.todayCell.colSpan=7+this.colStart;
if(Rico.theme.calendarFooter){Rico.addClass(this.todayCell,Rico.theme.calendarFooter)
}Rico.eventBind(this.todayCell,"click",Rico.eventHandle(this,"selectNow"),false)
}this.content.appendChild(this.maintab);
-var g=Rico.isIE&&Rico.ieVersion<7;
-var e={shadow:!g};
-this.monthPopup=new Rico.Popup(document.createElement("div"),e);
+this.monthPopup=new Rico.Popup(document.createElement("div"));
this.monthPopup.closePopup();
f=document.createElement("table");
f.className="ricoCalMenu";
f.border=0;
f.style.borderCollapse="separate";
f.style.margin="0px";
-for(k=0;
-k<4;
-k++){b=f.insertRow(-1);
for(h=0;
-h<3;
-h++){n=b.insertCell(-1);
-o=document.createElement("a");
-o.innerHTML=Rico.monthAbbr(k*3+h);
-o.name=k*3+h;
-if(Rico.theme.calendarDay){Rico.addClass(o,Rico.theme.calendarDay)
-}n.appendChild(o);
-Rico.eventBind(o,"click",Rico.eventHandle(this,"selectMonth"),false)
+h<4;
+h++){d=f.insertRow(-1);
+for(g=0;
+g<3;
+g++){l=d.insertCell(-1);
+m=document.createElement("a");
+m.innerHTML=Rico.monthAbbr(h*3+g);
+m.name=h*3+g;
+if(Rico.theme.calendarDay){Rico.addClass(m,Rico.theme.calendarDay)
+}l.appendChild(m);
+Rico.eventBind(m,"click",Rico.eventHandle(this,"selectMonth"),false)
}}new Rico.HoverSet(f.getElementsByTagName("a"));
this.monthPopup.content.appendChild(f);
-this.content.appendChild(this.monthPopup.container);
-this.yearPopup=new Rico.Popup(document.createElement("div"),e);
+this.container.appendChild(this.monthPopup.container);
+this.yearPopup=new Rico.Popup(document.createElement("div"));
this.yearPopup.closePopup();
this.yearPopup.content.className="ricoCalYearPrompt";
if(Rico.theme.calendarPopdown){Rico.addClass(this.yearPopup.content,Rico.theme.calendarPopdown)
f.border=0;
f.style.borderCollapse="separate";
f.style.margin="0px";
-b=f.insertRow(-1);
-this.yearLabel=b.insertCell(-1);
+d=f.insertRow(-1);
+this.yearLabel=d.insertCell(-1);
this.yearLabel.colSpan=3;
-b=f.insertRow(-1);
-n=b.insertCell(-1);
-this.yearInput=n.appendChild(document.createElement("input"));
+this.yearLabel.innerHTML=Rico.getPhraseById("calYearRange",this.options.minDate.getFullYear(),this.options.maxDate.getFullYear());
+d=f.insertRow(-1);
+l=d.insertCell(-1);
+this.yearInput=l.appendChild(document.createElement("input"));
this.yearInput.maxlength=4;
this.yearInput.size=4;
-Rico.eventBind(this.yearInput,"keypress",Rico.eventHandle(this,"yearKey"),false);
-n=b.insertCell(-1);
-var o=Rico.floatButton("Checkmark",Rico.eventHandle(this,"processPopUpYear"));
-Rico.setStyle(o.firstChild,{margin:"0px",padding:"0px",border:"none"});
-n.appendChild(o);
-n=b.insertCell(-1);
-o=Rico.floatButton("Cancel",Rico.eventHandle(this,"popDownYear"));
-Rico.setStyle(o.firstChild,{margin:"0px",padding:"0px",border:"none"});
-n.appendChild(o);
+Rico.eventBind(this.yearInput,"keyup",Rico.eventHandle(this,"yearKey"),false);
+l=d.insertCell(-1);
+var m=Rico.floatButton("Checkmark",Rico.eventHandle(this,"processPopUpYear"));
+Rico.setStyle(m.firstChild,{margin:"0px",padding:"0px",border:"none"});
+l.appendChild(m);
+l=d.insertCell(-1);
+m=Rico.floatButton("Cancel",Rico.eventHandle(this,"popDownYear"));
+Rico.setStyle(m.firstChild,{margin:"0px",padding:"0px",border:"none"});
+l.appendChild(m);
this.yearPopup.content.appendChild(f);
-this.content.appendChild(this.yearPopup.container);
-o=this.content.getElementsByTagName("a");
-for(k=0;
-k<o.length;
-k++){o[k].href="javascript:void(0)"
+this.container.appendChild(this.yearPopup.container);
+this.yearPopup.container.style.left="";
+this.yearPopup.container.style.right="5px";
+this.yearPopup.container.style.zIndex=10;
+m=this.content.getElementsByTagName("a");
+for(h=0;
+h<m.length;
+h++){m[h].href="javascript:void(0)"
}Rico.eventBind(this.tbody,"click",Rico.eventHandle(this,"saveAndClose"));
this.close();
this.bPageLoaded=true
},_createTitleSection:function(d){var c=document.createElement("span");
c.className="RicoCal"+d+"Heading";
-var b=c.appendChild(document.createElement("a"));
+if(Rico.theme.calendarSubheading){Rico.addClass(c,Rico.theme.calendarSubheading)
+}var b=c.appendChild(document.createElement("a"));
b.className="Rico_leftArrow";
if(Rico.theme.leftArrowAnchor){Rico.addClass(b,Rico.theme.leftArrowAnchor)
}b.appendChild(this.createNavArrow("dec"+d,"left"));
this.monthSelected=parseInt(a.name,10);
this.constructCalendar();
Rico.eventStop(b)
-},popUpMonth:function(a){if(this.monthPopup.visible()){this.popDownMonth();
+},popUpMonth:function(a){Rico.eventStop(a);
+if(this.monthPopup.visible()){this.popDownMonth();
return
}this.popDownYear();
-this.monthPopup.openPopup(this.titleMonth.parentNode.offsetLeft,this.thead.offsetHeight+2);
-Rico.eventStop(a);
-return false
+if(Rico.isIE&&Rico.ieVersion<7){this.monthPopup.openPopup(null,this.heading.offsetHeight+2);
+this.monthPopup.container.style.left=""
+}else{this.monthPopup.openPopup(3,this.heading.offsetHeight+2)
+}return false
},popDownMonth:function(){this.monthPopup.closePopup()
},popDownYear:function(){this.yearPopup.closePopup();
this.yearInput.disabled=true
-},popUpYear:function(a){if(this.yearPopup.visible()){this.popDownYear();
+},popUpYear:function(a){Rico.eventStop(a);
+if(this.yearPopup.visible()){this.popDownYear();
return
}this.popDownMonth();
-this.yearPopup.openPopup(90,this.thead.offsetHeight+2);
-this.yearLabel.innerHTML=Rico.getPhraseById("calYearRange",this.options.minDate.getFullYear(),this.options.maxDate.getFullYear());
+this.yearPopup.openPopup(null,this.heading.offsetHeight+2);
this.yearInput.disabled=false;
this.yearInput.value="";
this.yearInput.focus();
-Rico.eventStop(a);
return false
},yearKey:function(a){switch(Rico.eventKey(a)){case 27:this.popDownYear();
Rico.eventStop(a);
}}};
if(typeof Rico=="undefined"){throw ("GridCommon requires the Rico JavaScript framework")
}Rico.GridCommon={baseInit:function(){this.options={saveColumnInfo:{width:true,filter:false,sort:false},cookiePrefix:"RicoGrid.",allowColResize:true,windowResize:true,click:null,dblclick:null,contextmenu:null,menuEvent:"dblclick",defaultWidth:-1,scrollBarWidth:19,minScrollWidth:100,frozenColumns:0,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,exportFormFields:true,FilterLocation:null,FilterAllToken:"___ALL___",columnSpecs:[]};
-this.colWidths=[];
this.hdrCells=[];
this.headerColCnt=0;
this.headerRowIdx=0;
a++){this.columns[a].insertResizer()
}},createDivs:function(){Rico.log("createDivs start");
this.outerDiv=this.createDiv("outer");
-if(Rico.theme.widget){Rico.addClass(this.outerDiv,Rico.theme.widget)
+if(Rico.theme.gridContainer){Rico.addClass(this.outerDiv,Rico.theme.gridContainer)
}if(this.outerDiv.firstChild&&this.outerDiv.firstChild.tagName&&this.outerDiv.firstChild.tagName.toUpperCase()=="TABLE"){this.structTab=this.outerDiv.firstChild;
this.structTabLeft=this.structTab.rows[0].cells[0];
this.structTabUR=this.structTab.rows[0].cells[1];
b.vAlign="top";
this.structTabLeft=b.insertCell(-1);
this.structTabLeft.rowSpan=2;
+this.structTabLeft.style.padding="0px";
+this.structTabLeft.style.border="none";
var d=this.structTab.insertRow(-1);
d.vAlign="top";
this.structTabUR=b.insertCell(-1);
+this.structTabUR.style.padding="0px";
+this.structTabUR.style.border="none";
this.structTabLR=d.insertCell(-1);
+this.structTabLR.style.padding="0px";
+this.structTabLR.style.border="none";
this.outerDiv.appendChild(this.structTab)
-}this.frozenTabs=this.createDiv("frozenTabs",this.structTabLeft);
+}Rico.addClass(this.structTab,"ricoLG_StructTab");
+this.frozenTabs=this.createDiv("frozenTabs",this.structTabLeft);
this.innerDiv=this.createDiv("inner",this.structTabUR);
this.scrollDiv=this.createDiv("scroll",this.structTabLR);
this.resizeDiv=this.createDiv("resize",this.outerDiv,true);
}d.push("f"+e+":"+b.join("~"))
}}Rico.setCookie(this.options.cookiePrefix+this.tableId,d.join(","),this.options.cookieDays,this.options.cookiePath,this.options.cookieDomain)
}};
-Rico.ColumnConst={UNFILTERED:0,SYSTEMFILTER:1,USERFILTER:2,UNSORTED:0,SORT_ASC:"ASC",SORT_DESC:"DESC",MINWIDTH:10,DOLLAR:{type:"number",prefix:"$",decPlaces:2,ClassName:"alignright"},EURO:{type:"number",prefix:"€",decPlaces:2,ClassName:"alignright"},PERCENT:{type:"number",suffix:"%",decPlaces:2,multiplier:100,ClassName:"alignright"},QTY:{type:"number",decPlaces:0,ClassName:"alignright"},DEFAULT:{type:"showTags"}};
+Rico.ColumnConst={UNFILTERED:0,SYSTEMFILTER:1,USERFILTER:2,UNSORTED:0,SORT_ASC:"ASC",SORT_DESC:"DESC",MINWIDTH:10};
Rico.TableColumnBase=function(){};
Rico.TableColumnBase.prototype={baseInit:function(h,g,e,d){Rico.log("TableColumnBase.init index="+g+" tabIdx="+d);
this.liveGrid=h;
this.mouseUpHandler=Rico.eventHandle(this,"handleMouseUp");
this.mouseOutHandler=Rico.eventHandle(this,"handleMouseOut");
this.fieldName="col"+this.index;
+this.format={type:"text"};
var b=h.options.columnSpecs[g];
-this.format=Rico.extend({},Rico.ColumnConst.DEFAULT);
-switch(typeof b){case"object":if(typeof b.format=="string"){Rico.extend(this.format,Rico.ColumnConst[b.format.toUpperCase()])
-}Rico.extend(this.format,b);
-break;
-case"string":if(b.slice(0,4)=="spec"){b=b.slice(4).toUpperCase()
-}if(typeof Rico.ColumnConst[b]=="object"){Rico.extend(this.format,Rico.ColumnConst[b])
-}break
+if(typeof b=="object"){Rico.extend(this.format,b)
}Rico.addClass(this.dataColDiv,this.colClassName());
this.visible=true;
if(typeof this.format.visible=="boolean"){this.visible=this.format.visible
if(b.length>0){return b[0].innerHTML
}else{return Rico.stripTags(a.innerHTML)
}},_clear:function(a){a.innerHTML=" "
-},clearCell:function(d){var c=this.cell(d);
-this._clear(c,d);
-if(!this.liveGrid.buffer){return
-}var b=this.liveGrid.buffer.options.acceptAttr;
-for(var a=0;
-a<b.length;
-a++){switch(b[a]){case"style":c.style.cssText="";
-break;
-case"class":c.className="";
-break;
-default:c["_"+b[a]]="";
-break
-}}},dataTable:function(){return this.liveGrid.tabs[this.tabIdx]
+},clearCell:function(b){var a=this.cell(b);
+this._clear(a,b);
+if(this.liveGrid.buffer&&this.liveGrid.buffer.options.acceptStyle){a.style.cssText=""
+}},dataTable:function(){return this.liveGrid.tabs[this.tabIdx]
},numRows:function(){return this.dataColDiv.childNodes.length
},clearColumn:function(){var b=this.numRows();
for(var a=0;
b+=a;
this.resizeDiv.style.height=b+"px";
this.handleScroll()
-},printVisible:function(a){this.showMsg(Rico.getPhraseById("exportInProgress"));
-Rico.runLater(10,this,"_printVisible",a)
-},_printVisible:function(a){this.exportStart();
-var g=this.getExportStyles(this.tbody[0]);
-for(var f=0;
-f<this.pageSize;
-f++){if(this.columns[0].cell(f).style.display=="none"){continue
-}var e="";
-for(var h=0;
-h<this.columns.length;
-h++){var d=this.columns[h];
-if(d.visible){var b=d.getFormattedValue(f,!this.options.exportImgTags,!this.options.exportFormFields,"NoExport");
-if(d.format.exportPrefix){b=d.format.exportPrefix+b
-}if(b==""){b=" "
-}e+="<td style='"+this.exportStyle(d.cell(f),g)+"'>"+b+"</td>"
-}}this.exportRows.push(e)
-}this.exportFinish(a)
+},printVisible:function(){this.showMsg(Rico.getPhraseById("exportInProgress"));
+Rico.runLater(10,this,"_printVisible")
+},_printVisible:function(){this.exportStart();
+var f=this.getExportStyles(this.tbody[0]);
+for(var e=0;
+e<this.pageSize;
+e++){if(this.columns[0].cell(e).style.display=="none"){continue
+}var d="";
+for(var g=0;
+g<this.columns.length;
+g++){var b=this.columns[g];
+if(b.visible){var a=b.getFormattedValue(e,!this.options.exportImgTags,!this.options.exportFormFields,"NoExport");
+if(b.format.exportPrefix){a=b.format.exportPrefix+a
+}if(a==""){a=" "
+}d+="<td style='"+this.exportStyle(b.cell(e),f)+"'>"+a+"</td>"
+}}this.exportRows.push(d)
+}this.exportFinish()
},hideRow:function(a){if(this.columns[0].cell(a).style.display=="none"){return
}for(var b=0;
b<this.columns.length;
this.totalRows=0;
this.rowcntContent="";
this.rcvdOffset=-1;
-this.options={fixedHdrRows:0,canFilter:true,isEncoded:true,acceptAttr:[]};
+this.options={fixedHdrRows:0,canFilter:true,isEncoded:true,acceptStyle:false};
Rico.extend(this.options,a||{});
-if(b){this.loadRowsFromTable(b,this.options.fixedHdrRows)
+if(b){this.loadRowsFromTable(b,this.options.fixedHdrRows);
+b.parentNode.removeChild(b)
}else{this.clear()
}},registerGrid:function(a){this.liveGrid=a
},setTotalRows:function(a){if(typeof(a)!="number"){a=this.size
break;
default:this.liveGrid.updateHeightDiv();
break
-}},loadRowsFromTable:function(h,g){var e=new Array();
+}},loadRowsFromTable:function(h,g){var e=[];
var a=h.getElementsByTagName("tr");
for(var d=g||0;
d<a.length;
-d++){var f=new Array();
+d++){var f=[];
var c=a[d].getElementsByTagName("td");
for(var b=0;
b<c.length;
this.startPos=0;
this.size=this.baseRows.length
},dom2jstable:function(f){Rico.log("dom2jstable: encoded="+this.options.isEncoded);
-var e=new Array();
+var e=[];
var a=f.getElementsByTagName("tr");
for(var d=0;
d<a.length;
-d++){var g=new Array();
+d++){var g=[];
var c=a[d].getElementsByTagName("td");
for(var b=0;
b<c.length;
b++){g[b]=Rico.getContentAsString(c[b],this.options.isEncoded)
}e.push(g)
}return e
-},dom2jstableAttr:function(e,b){var h=this.options.acceptAttr;
-Rico.log("dom2jstableAttr start, # attr="+h.length);
-var f=new Array();
-var g=e.getElementsByTagName("tr");
-for(var d=b||0;
-d<g.length;
-d++){var m=new Array();
-var l=g[d].getElementsByTagName("td");
-for(var c=0;
-c<l.length;
-c++){m[c]={};
-for(var a=0;
-a<h.length;
-a++){m[c]["_"+h[a]]=l[c].getAttribute(h[a])
-}if(Rico.isIE){m[c]._class=l[c].getAttribute("className")
-}}f.push(m)
-}Rico.log("dom2jstableAttr end");
-return f
},_blankRow:function(){var a=[];
for(var b=0;
b<this.liveGrid.columns.length;
},bufferRow:function(a){return this.windowStart+a
},getWindowCell:function(c,b){var a=this.bufferRow(c);
return this.isVisible(a)&&b<this.rows[a].length?this.rows[a][b]:null
-},getWindowAttr:function(c,b){var a=this.bufferRow(c);
-return this.attr&&this.isVisible(a)&&b<this.attr[a].length?this.attr[a][b]:null
+},getWindowStyle:function(c,b){var a=this.bufferRow(c);
+return this.attr&&this.isVisible(a)&&b<this.attr[a].length?this.attr[a][b]:""
},getWindowValue:function(b,a){return this.getWindowCell(b,a)
},setWindowValue:function(d,b,c){var a=this.bufferRow(d);
if(a>=this.windowEnd){return false
return true
},getRows:function(f,d){var e=f-this.startPos;
var a=Math.min(e+d,this.size);
-var c=new Array();
+var c=[];
for(var b=e;
b<a;
b++){c.push(this.rows[b])
}}if(f){g.push(this.baseRows[a])
}}this.rows=g
}this.rowcntContent=this.size=this.rows.length
-},printAll:function(a){this.liveGrid.showMsg(Rico.getPhraseById("exportInProgress"));
-Rico.runLater(10,this,"_printAll",a)
-},_printAll:function(a){this.liveGrid.exportStart();
+},printAll:function(){this.liveGrid.showMsg(Rico.getPhraseById("exportInProgress"));
+Rico.runLater(10,this,"_printAll")
+},_printAll:function(){this.liveGrid.exportStart();
this.exportBuffer(this.getRows(0,this.totalRows));
-this.liveGrid.exportFinish(a)
-},printVisible:function(a){this.liveGrid.showMsg(Rico.getPhraseById("exportInProgress"));
-Rico.runLater(10,this,"_printVisible",a)
-},_printVisible:function(a){this.liveGrid.exportStart();
+this.liveGrid.exportFinish()
+},printVisible:function(){this.liveGrid.showMsg(Rico.getPhraseById("exportInProgress"));
+Rico.runLater(10,this,"_printVisible")
+},_printVisible:function(){this.liveGrid.exportStart();
this.exportBuffer(this.visibleRows());
-this.liveGrid.exportFinish(a)
+this.liveGrid.exportFinish()
},exportBuffer:function(l,f){var a,g,k,b,j;
Rico.log("exportBuffer: "+l.length+" rows");
var e=this.liveGrid.getExportStyles(this.liveGrid.tbody[0]);
}}for(b=0;
b<3;
b++){this.tabs[b]=document.createElement("table");
-this.tabs[b].className="ricoLG_table";
+this.tabs[b].className=(b<2)?"ricoLG_table":"ricoLG_scrollTab";
this.tabs[b].border=0;
this.tabs[b].cellPadding=0;
this.tabs[b].cellSpacing=0;
}for(b=0;
b<2;
b++){this.thead[b]=this.tabs[b].createTHead();
-Rico.addClass(this.tabs[b],"ricoLG_top");
+this.thead[b].className="ricoLG_top";
if(Rico.theme.gridheader){Rico.addClass(this.thead[b],Rico.theme.gridheader)
}}for(b=0;
b<2;
var i=l.getElementsByTagName("div");
var g=Rico.getStyle(this.cell(0,h),"textAlign");
i[1].style.textAlign=g;
-switch(f.filterUI.charAt(0)){case"t":j=Rico.createFormField(i[1],"input","text",d,d);
+switch(f.filterUI.charAt(0)){case"t":j=Rico.createFormField(i[1],"input",Rico.inputtypes.search?"search":"text",d,d);
var n=f.filterUI.match(/\d+/);
j.maxLength=f.Length||50;
j.size=n?parseInt(n,10):10;
-i[1].appendChild(Rico.clearButton(Rico.eventHandle(e,"filterClear")));
-if(e.filterType==Rico.ColumnConst.USERFILTER&&e.filterOp=="LIKE"){var k=e.filterValues[0];
+if(j.type!="search"){i[1].appendChild(Rico.clearButton(Rico.eventHandle(e,"filterClear")))
+}if(e.filterType==Rico.ColumnConst.USERFILTER&&e.filterOp=="LIKE"){var k=e.filterValues[0];
if(k.charAt(0)=="*"){k=k.substr(1)
}if(k.slice(-1)=="*"){k=k.slice(0,-1)
}j.value=k;
e++){a=g[e].cells;
for(j=0,d=0;
a.length>0;
-j++){if(a[0].className=="ricoFrozen"){if(e==this.headerRowIdx){this.options.frozenColumns=j+1
+j++){if(Rico.hasClass(a[0],"ricoFrozen")){if(e==this.headerRowIdx){this.options.frozenColumns=j+1
}}else{d=1
}this.thead[d].rows[e].appendChild(a[0])
}}}Rico.log("loadHdrSrc end")
},setHorizontalScroll:function(){var a=(-this.scrollDiv.scrollLeft)+"px";
this.tabs[1].style.marginLeft=a;
this.tabs[2].style.marginLeft=a
-},remainingHt:function(){var f;
+},remainingHt:function(){var f=this.outerDiv.offsetHeight;
var g=Rico.windowHeight();
var e=Rico.isIE?15:10;
if(!Rico.isIE&&window.frameElement&&window.frameElement.scrolling=="yes"&&this.sizeTo!="parent"){e+=this.options.scrollBarWidth
}switch(this.sizeTo){case"window":var d=Rico.cumulativeOffset(this.outerDiv).top;
-f=Math.max(this.tabs[0].offsetHeight,this.tabs[1].offsetHeight);
-Rico.log("remainingHt, winHt="+g+" tabHt="+f+" gridY="+d);
-return g-d-f-this.options.scrollBarWidth-e;
+Rico.log("remainingHt/window, winHt="+g+" tabHt="+f+" gridY="+d);
+return g-d-f-e;
case"parent":var h=this.offsetFromParent(this.outerDiv);
-f=Math.max(this.tabs[0].offsetHeight,this.tabs[1].offsetHeight);
if(Rico.isIE){Rico.hide(this.outerDiv)
-}var b=this.outerDiv.parentNode.offsetHeight;
+}var b=this.outerDiv.parentNode.clientHeight;
if(Rico.isIE){Rico.show(this.outerDiv)
-}Rico.log("remainingHt, parentHt="+b+" gridY="+h+" winHt="+g+" tabHt="+f);
-return b-f-h-this.options.scrollBarWidth;
+}Rico.log("remainingHt/parent, parentHt="+b+" offset="+h+" tabHt="+f);
+return b-f-h-e;
case"data":case"body":var a=Rico.isIE?document.body.scrollHeight:document.body.offsetHeight;
var c=g-a-e;
if(!Rico.isWebKit){c-=this.options.scrollBarWidth
}Rico.log("remainingHt, winHt="+g+" pageHt="+a+" remHt="+c);
return c;
-default:f=Math.max(this.tabs[0].offsetHeight,this.tabs[1].offsetHeight);
-Rico.log("remainingHt, winHt="+g+" tabHt="+f);
+default:Rico.log("remainingHt, winHt="+g+" tabHt="+f);
if(this.sizeTo.slice(-1)=="%"){g*=parseFloat(this.sizeTo)/100
}else{if(this.sizeTo.slice(-2)=="px"){g=parseInt(this.sizeTo,10)
-}}return g-f-this.options.scrollBarWidth-e
+}}return g-f-e
}},offsetFromParent:function(b){var a=0;
var c=b.parentNode;
do{a+=b.offsetTop||0;
}}if(this.options.highlightElem=="selection"&&!this.isSelected(b.cell)){this.selectCell(b.cell)
}var c=this;
this.menu.showmenu(f,function(){c.closeMenu()
-})
+});
+return false
},closeMenu:function(){if(!this.menuIdx){return
}if(this.hideScroll){this.scrollDiv.style.overflow=""
}this.highlightEnabled=true;
var f=this.datasetIndex(a);
return(c<=f.row&&f.row<=b&&e<=f.column&&f.column<=d)
},highlightCell:function(a){Rico.addClass(a,this.options.highlightClass)
-},unhighlightCell:function(a){if(a==null){return
-}Rico.removeClass(a,this.options.highlightClass)
-},selectRow:function(a){for(var b=0;
+},unhighlightCell:function(a){if(a){Rico.removeClass(a,this.options.highlightClass)
+}},selectRow:function(a){for(var b=0;
b<this.columns.length;
b++){this.highlightCell(this.columns[b].cell(a))
}},unselectRow:function(a){for(var b=0;
Rico.LiveGridColumn.prototype={initialize:function(liveGrid,colIdx,hdrInfo,tabIdx){Rico.extend(this,new Rico.TableColumnBase());
this.baseInit(liveGrid,colIdx,hdrInfo,tabIdx);
this.buffer=liveGrid.buffer;
-if(typeof(this.format.type)!="string"||this.format.EntryType=="tinyMCE"){this.format.type="raw"
+if(typeof(this.format.type)!="string"||this.format.EntryType=="tinyMCE"){this.format.type="html"
}if(typeof this.isNullable!="boolean"){this.isNullable=/number|date/.test(this.format.type)
-}this.isText=/raw|text|showTags/.test(this.format.type);
+}this.isText=/html|text/.test(this.format.type);
Rico.log(" sortable="+this.sortable+" filterable="+this.filterable+" hideable="+this.hideable+" isNullable="+this.isNullable+" isText="+this.isText);
this.fixHeaders(this.liveGrid.tableId,this.options.hdrIconsFirst);
if(this["format_"+this.format.type]){this._format=this["format_"+this.format.type]
},mFilterOtherClick:function(a){this.mFilterInputs[0].checked=false;
this.mFilterChange=true
},format_text:function(a){if(typeof a!="string"){return" "
-}else{return Rico.stripTags(a)
-}},format_showTags:function(a){if(typeof a!="string"){return" "
}else{return a.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")
}},format_number:function(a){if(typeof a=="undefined"||a==""||a==null){return" "
}else{return Rico.formatNumber(a,this.format)
}else{var b=Rico.setISO8601(a);
if(!b){return a
}return(this.format.prefix||"")+Rico.formatDate(b,this.format.dateFmt||"translateDateTime")+(this.format.suffix||"")
-}},format_UTCasLocalTime:function(a){if(typeof a=="undefined"||a==""||a==null){return" "
+}},format_utcaslocaltime:function(a){if(typeof a=="undefined"||a==""||a==null){return" "
}else{var c=new Date();
var b=Rico.setISO8601(a,-c.getTimezoneOffset());
if(!b){return a
}if(!this.format.filterUI){Rico.eventBind(this.imgFilter,"click",Rico.eventHandle(this,"filterClick"),false)
}},filterClick:function(a){if(this.filterType==Rico.ColumnConst.USERFILTER&&this.filterOp=="LIKE"){this.liveGrid.openKeyword(this.index)
}},getValue:function(a){return this.buffer.getWindowCell(a,this.index)
-},getBufferAttr:function(a){return this.buffer.getWindowAttr(a,this.index)
+},getBufferStyle:function(a){return this.buffer.getWindowStyle(a,this.index)
},setValue:function(b,a){this.buffer.setWindowValue(b,this.index,a)
},_format:function(a){return a
},_display:function(a,b){b.innerHTML=this._format(a)
},_export:function(a){return this._format(a)
},exportBuffer:function(a){return this._export(this.buffer.getValue(a,this.index))
-},displayValue:function(f){var a=this.getValue(f);
-if(a==null){this.clearCell(f);
+},displayValue:function(c){var a=this.getValue(c);
+if(a==null){this.clearCell(c);
return
-}var e=this.cell(f);
-this._display(a,e,f);
-var d=this.buffer.options.acceptAttr;
-if(d.length==0){return
-}var c=this.getBufferAttr(f);
-if(c==null){return
-}for(var b=0;
-b<d.length;
-b++){c=c["_"+d[b]]||"";
-switch(d[b]){case"style":e.style.cssText=c;
-break;
-case"class":e.className=c;
-break;
-default:e["_"+d[b]]=c;
-break
-}}}};
+}var b=this.cell(c);
+this._display(a,b,c);
+if(this.buffer.options.acceptStyle){b.style.cssText=this.getBufferStyle(c)
+}}};
Rico.TableColumn={};
Rico.TableColumn.checkboxKey=function(a){this.initialize(a)
};
this.sortmenu.addMenuItemId("gridmenuSortDesc",function(){d.sortDesc()
},true)
}this.filtermenu.clearMenu();
-if(d.canFilter()&&!d.format.filterUI&&(!b||d.filterType==Rico.ColumnConst.USERFILTER)){this.addSubMenuItem(Rico.getPhraseById("gridmenuFilterBy",d.displayName),this.filtermenu,false);
-d.userFilter=d.getValue(a);
+if(d.canFilter()){this.addSubMenuItem(Rico.getPhraseById("gridmenuFilterBy",d.displayName),this.filtermenu,false);
+if(!d.format.filterUI&&(!b||d.filterType==Rico.ColumnConst.USERFILTER)){d.userFilter=d.getValue(a);
if(d.filterType==Rico.ColumnConst.USERFILTER){this.filtermenu.addMenuItemId("gridmenuRemoveFilter",function(){d.setUnfiltered(false)
},true);
if(d.filterOp=="LIKE"){this.filtermenu.addMenuItemId("gridmenuChgKeyword",function(){o.openKeyword(i)
},true)
}this.filtermenu.addMenuItemId("gridmenuExclude",function(){d.setFilterNE()
},true)
-}}if(o.filterCount()>0){this.filtermenu.addMenuItemId("gridmenuRefresh",function(){o.filterHandler()
-},true);
-this.filtermenu.addMenuItemId("gridmenuRemoveAll",function(){o.clearFilters()
+}}}if(o.filterCount()>0){this.filtermenu.addMenuItemId("gridmenuRemoveAll",function(){o.clearFilters()
},true)
-}}else{if(o.filterCount()>0){this.addSubMenuItem(Rico.getPhraseById("gridmenuFilterBy",d.displayName),this.filtermenu,false);
-this.filtermenu.addMenuItemId("gridmenuRemoveAll",function(){o.clearFilters()
+}this.filtermenu.addMenuItemId("gridmenuRefresh",function(){o.filterHandler()
},true)
-}}this.exportmenu.clearMenu();
-if(f.printVisibleSQL&&typeof(f.dataSource)=="string"){this.addSubMenuItem(Rico.getPhraseById("gridmenuExport"),this.exportmenu,false);
-this.exportmenu.addMenuItemId("gridmenuExportVis2Web",function(){f.printVisibleSQL("html")
+}this.exportmenu.clearMenu();
+if(n>0){this.addSubMenuItem(Rico.getPhraseById("gridmenuExport"),this.exportmenu,false);
+if(f.printVisibleSQL&&typeof(f.dataSource)=="string"){this.exportmenu.addMenuItemId("gridmenuExportVis2Web",function(){f.printVisibleSQL("html")
});
this.exportmenu.addMenuItemId("gridmenuExportAll2Web",function(){f.printAllSQL("html")
},f.totalRows<=n);
});
this.exportmenu.addMenuItemId("gridmenuExportAll2SS",function(){f.printAllSQL("xl")
},f.totalRows<=n)
-}else{if(n>0&&m>0){this.addSubMenuItem(Rico.getPhraseById("gridmenuExport"),this.exportmenu,false);
-this.exportmenu.addMenuItemId("gridmenuExportVis2Web",function(){f.printVisible("plain")
-});
-this.exportmenu.addMenuItemId("gridmenuExportAll2Web",function(){f.printAll("plain")
-},f.totalRows<=n);
-if(Rico.isIE){this.exportmenu.addMenuBreak();
-this.exportmenu.addMenuItemId("gridmenuExportVis2SS",function(){f.printVisible("owc")
+}else{this.addSubMenuItem(Rico.getPhraseById("gridmenuExport"),this.exportmenu,false);
+this.exportmenu.addMenuItemId("gridmenuExportVis2Web",function(){f.printVisible()
});
-this.exportmenu.addMenuItemId("gridmenuExportAll2SS",function(){f.printAll("owc")
+this.exportmenu.addMenuItemId("gridmenuExportAll2Web",function(){f.printAll()
},f.totalRows<=n)
-}}}var k=o.listInvisible();
+}}var k=o.listInvisible();
for(var e=0,j=0;
j<k.length;
j++){if(k[j].canHideShow()){e++
},clearTimer:function(){if(typeof this.timeoutHandler!="number"){return
}window.clearTimeout(this.timeoutHandler);
delete this.timeoutHandler
-},jsUpdate:function(a,c,f,b,d){this.clearTimer();
+},jsUpdate:function(a,c,e,b,d){this.clearTimer();
this.processingRequest=false;
Rico.log("jsUpdate: "+arguments.length);
if(d){Rico.log("jsUpdate: received error="+d);
this.rcvdRowCount=true;
this.foundRowCount=true;
Rico.log("jsUpdate: found RowCount="+this.rowcntContent)
-}this.updateBuffer(a,c,f);
+}this.updateBuffer(a,c,e);
if(this.options.onAjaxUpdate){this.options.onAjaxUpdate()
}this.updateGrid(a);
if(this.options.TimeOut&&this.timerMsg){this.restartSessionTimer()
-}if(this.pendingRequest>=-1){var e=this.pendingRequest;
-Rico.log("jsUpdate: found pending request for offset="+e);
+}if(this.pendingRequest>=-1){var f=this.pendingRequest;
+Rico.log("jsUpdate: found pending request for offset="+f);
this.pendingRequest=-2;
-this.fetch(e)
+this.fetch(f)
}},ajaxUpdate:function(a,c){this.clearTimer();
this.processingRequest=false;
if(c.status!=200){Rico.log("ajaxUpdate: received http error="+c.status);
}if(!o){alert("Data provider returned an invalid XML response");
Rico.log("Data provider returned an invalid XML response");
return false
-}var e=o.getElementsByTagName("ajax-response");
-if(e==null||e.length!=1){return false
-}this.rcvdRows=0;
+}var d=o.getElementsByTagName("ajax-response");
+if(d==null||d.length!=1){alert("Received invalid response from server");
+return false
+}Rico.log("Processing ajax-response");
+this.rcvdRows=0;
this.rcvdRowCount=false;
-var c=e[0];
-var a=c.getElementsByTagName("debug");
+var b=d[0];
+var a=b.getElementsByTagName("debug");
for(var g=0;
g<a.length;
g++){Rico.log("ajaxUpdate: debug msg "+g+": "+Rico.getContentAsString(a[g],this.options.isEncoded))
-}var l=c.getElementsByTagName("error");
-if(l.length>0){var d=Rico.getContentAsString(l[0],this.options.isEncoded);
-alert("Data provider returned an error:\n"+d);
-Rico.log("Data provider returned an error:\n"+d);
+}var l=b.getElementsByTagName("error");
+if(l.length>0){var c=Rico.getContentAsString(l[0],this.options.isEncoded);
+alert("Data provider returned an error:\n"+c);
+Rico.log("Data provider returned an error:\n"+c);
return false
-}var j=c.getElementsByTagName("rows")[0];
+}var j=b.getElementsByTagName("rows")[0];
if(!j){Rico.log("ajaxUpdate: invalid response");
this.liveGrid.showMsg(Rico.getPhraseById("invalidResponse"));
return false
-}var n=c.getElementsByTagName("rowcount");
+}var n=b.getElementsByTagName("rowcount");
if(n&&n.length==1){this.rowcntContent=Rico.getContentAsString(n[0],this.options.isEncoded);
this.rcvdRowCount=true;
this.foundRowCount=true;
this.rcvdOffset=j.getAttribute("offset");
Rico.log("ajaxUpdate: rcvdOffset="+this.rcvdOffset);
var h=this.dom2jstable(j);
-var b=(this.options.acceptAttr.length>0)?this.dom2jstableAttr(j):false;
+var e=(this.options.acceptStyle)?this.dom2jstableStyle(j):false;
this.rcvdRows=h.length;
-this.updateBuffer(k,h,b);
+this.updateBuffer(k,h,e);
return true
+},dom2jstableStyle:function(e,b){var a=this.options.acceptStyle;
+Rico.log("dom2jstableStyle start");
+var f=[];
+var g=e.getElementsByTagName("tr");
+for(var d=b||0;
+d<g.length;
+d++){var k=[];
+var h=g[d].getElementsByTagName("td");
+for(var c=0;
+c<h.length;
+c++){k[c]=h[c].getAttribute("style")||""
+}f.push(k)
+}Rico.log("dom2jstableStyle end");
+return f
},processResponseJSON:function(a,d){var c=Rico.getJSON(d);
if(!c||c==null){alert("Data provider returned an invalid JSON response");
Rico.log("Data provider returned an invalid JSON response");
this.foundRowCount=true;
Rico.writeDebugMsg("loadRows, found RowCount="+c.rowcount)
}this.rcvdRows=c.rows.length;
-this.updateBuffer(a,c.rows);
+this.updateBuffer(a,c.rows,c.styles);
return true
},updateBuffer:function(c,a,b){this.baseRows=a;
this.attr=b;
c.hidden=this.liveGrid.listInvisible("index").join(",");
var b=this.dataSource+"?"+Rico.toQueryString(c);
window.open(b,"",this.liveGrid.options.exportWindow)
-},_printAll:function(a){this.liveGrid.exportStart();
+},_printAll:function(){this.liveGrid.exportStart();
this.ajaxOptions.parameters=this.formQueryHashSQL(0,this.liveGrid.options.maxPrint);
-var b=this;
-this.ajaxOptions.onComplete=function(){b._jsExport(a)
+var a=this;
+this.ajaxOptions.onComplete=function(){a._jsExport()
};
this.dataSource(this.ajaxOptions)
-},_jsExport:function(a,c,e,b,d){Rico.log("_jsExport: "+arguments.length);
-if(d){Rico.log("_jsExport: received error="+d);
-this.liveGrid.showMsg(Rico.getPhraseById("requestError",d));
+},_jsExport:function(b,d,a,c){Rico.log("_jsExport: "+arguments.length);
+if(c){Rico.log("_jsExport: received error="+c);
+this.liveGrid.showMsg(Rico.getPhraseById("requestError",c));
return
-}this.exportBuffer(c,0);
-this.liveGrid.exportFinish(a)
+}this.exportBuffer(b,0);
+this.liveGrid.exportFinish()
}};
if(typeof Rico=="undefined"){throw ("LiveGridForms requires the Rico JavaScript framework")
}Rico.TableEdit=function(a){this.initialize(a)
this.options={maxDisplayLen:20,panelHeight:200,panelWidth:500,compact:false,RecordName:Rico.getPhraseById("record"),updateURL:window.location.href,showSaveMsg:"errors"};
Rico.extend(this.options,b.options);
var a=this;
-this.hasWF2=(document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("WebForms","2.0"));
this.menu=b.menu;
this.menu.options.dataMenuHandler=function(d,f,g,e){return a.editMenu(d,f,g,e)
};
this.extraMenuItems=[];
this.responseHandler=function(){a.processResponse()
};
-Rico.log("Rico.TableEdit.initialize complete, hasWF2="+this.hasWF2)
+Rico.log("Rico.TableEdit.initialize complete")
},createKeyArray:function(){this.keys=[];
for(var a=0;
a<this.grid.columns.length;
a++){if(this.grid.columns[a].format&&this.grid.columns[a].format.isKey){this.keys.push({colidx:a})
}}},createEditDiv:function(){this.requestCount=1;
this.formPopup=this.createWindow();
-Rico.addClass(this.formPopup.content,"ricoLG_editDiv");
+Rico.addClass(this.formPopup.content.parentNode,"ricoLG_editDiv");
if(this.options.canEdit||this.options.canAdd){this.startForm();
this.createForm(this.form)
}else{var a=this.createButton(Rico.getPhraseById("close"));
}if(!b.Help){b.Help=b.dateFmt
}if(typeof b.min=="string"){b.min=Rico.setISO8601(b.min)||new Date(b.min)
}if(typeof b.max=="string"){b.max=Rico.setISO8601(b.max)||new Date(b.max)
-}if(this.hasWF2){e=Rico.createFormField(f,"input","date",a,a);
+}if(Rico.inputtypes.date){e=Rico.createFormField(f,"input","date",a,a);
e.required=b.required;
if(b.min){e.min=Rico.toISO8601String(b.min,3)
}if(b.max){e.max=Rico.toISO8601String(b.max,3)
break;
case"I":if(!b.isNullable){b.required=true
}if(!b.pattern){b.pattern="int-signed"
-}if(this.hasWF2){e=Rico.createFormField(f,"input","number",a,a);
+}if(Rico.inputtypes.number){e=Rico.createFormField(f,"input","number",a,a);
e.required=b.required;
e.min=b.min;
e.max=b.max;