<summary>\r
Class to define a LiveGrid\r
</summary>\r
- <remarks></remarks>\r
</member><member name="M:Rico.TableCollection.IndexOf(System.String)">\r
<summary>\r
Returns the index of the table with TblName or -1 if not found\r
<summary>\r
Specifies when the grid's popup menu should be invoked \r
</summary>\r
-</member><member name="F:Rico.GridBase.DefaultStyle">\r
+</member><member name="P:Rico.GridBase.DefaultStyle">\r
<summary>\r
Style used for the entire grid - headings and data.\r
</summary>\r
-</member><member name="F:Rico.GridBase.DefaultHdgStyle">\r
+</member><member name="P:Rico.GridBase.DefaultHdgStyle">\r
<summary>\r
This holds the default style for headings. Use only if not using themes.\r
</summary>\r
<summary>\r
Collection of styles used for individual headings.\r
</summary>\r
-</member><member name="P:Rico.GridBase.HdgRows">\r
+</member><member name="P:Rico.GridBase.HdgRowLines">\r
<summary>\r
- Lines of text displayed for each heading row\r
+ Lines of text displayed in each heading row\r
</summary>\r
-</member><member name="P:Rico.GridBase.DataRows">\r
+</member><member name="P:Rico.GridBase.DefaultRowLines">\r
<summary>\r
- Lines of text displayed for each data row\r
+ Lines of text displayed in each data row\r
</summary>\r
</member><member name="P:Rico.GridBase.OuterDivId">\r
<summary>\r
<summary>\r
If true, then style is only applied to the grid, not to html or Excel exports\r
</summary>\r
-</member><member name="P:Rico.StyleBase.bgcolor">\r
+</member><member name="P:Rico.StyleBase.BackColor">\r
<summary>\r
Specifies the background color. One of the 16 standard color names, or #rrggbb.\r
</summary>\r
-</member><member name="P:Rico.StyleBase.color">\r
+</member><member name="P:Rico.StyleBase.ForeColor">\r
<summary>\r
Specifies the font color. One of the 16 standard color names, or #rrggbb.\r
</summary>\r
-</member><member name="P:Rico.StyleBase.align">\r
+</member><member name="P:Rico.StyleBase.HorizontalAlign">\r
<summary>\r
- Specifies horizontal alignment: left, right, center, or none (default)\r
+ Specifies horizontal alignment: Left, Right, Center, or NotSet (default)\r
</summary>\r
</member><member name="P:Rico.StyleBase.CssStyle">\r
<summary>\r
<summary>\r
Base class for all style classes as well as the Column class.\r
</summary>\r
-</member><member name="T:Rico.DefaultGridStyle">\r
- <summary>\r
- This is the style applied to the entire grid - headings and data.\r
- </summary>\r
-</member><member name="T:Rico.DefaultHdgStyle">\r
- <summary>\r
- This defines the default heading style when no theme is used.\r
- </summary>\r
</member><member name="P:Rico.Style.StyleID">\r
<summary>\r
StyleID's should not contain spaces or other special characters.\r
- Use a StyleID of ricoLG_evenRow or ricoLG_oddRow to stripe the grid (striping does not get exported).\r
- Use a StyleID of ricoLG_selection to set the styling for the selected row.\r
- </summary>\r
+ <list type="bullet">\r
+ <item><description>Use a StyleID of Default to style the entire grid</description></item>\r
+ <item><description>Use a StyleID of DefaultHdg to style the grid heading</description></item>\r
+ <item><description>Use a StyleID of ricoLG_evenRow and/or ricoLG_oddRow to stripe the grid (striping does not get exported).</description></item>\r
+ <item><description>Use a StyleID of ricoLG_selection to set the styling for the selected row.</description></item>\r
+ </list>\r
+ </summary>\r
</member><member name="M:Rico.Style.CssRule">\r
<summary>\r
Returns the style properties as a CSS rule\r
<summary>\r
Returns the style properties as an Excel XML style, including the style tag\r
</summary>\r
+</member><member name="P:Rico.Style.xlNumberFormat">\r
+ <summary>\r
+ For SimpleGrids only\r
+ </summary>\r
+</member><member name="P:Rico.Style.NumberFormat">\r
+ <summary>\r
+ For SimpleGrids only\r
+ </summary>\r
+</member><member name="M:Rico.Style.WrappedXlStyleNF">\r
+ <summary>\r
+ Returns the style properties plus number format as an Excel XML style, including the style tag\r
+ </summary>\r
</member><member name="T:Rico.Style">\r
<summary>\r
Defines a style that can be applied to a grid cell.\r
Using a StyleID of ricoLG_evenRow or ricoLG_oddRow will stripe the grid, however striping does not get exported.\r
Using a StyleID of ricoLG_selection will set the styling for the selected row.\r
</summary>\r
-</member><member name="T:Rico.SimpleStyle">\r
- <summary>\r
- Defines styles used in Simple Grids\r
- </summary>\r
</member><member name="M:Rico.StyleDictionary.Add(Rico.Style)">\r
<summary>\r
Adds a Style object to the collection\r
<summary>\r
A strongly-typed resource class, for looking up localized strings, etc.\r
</summary>\r
+</member><member name="T:Rico.SimpleGrid">\r
+ <summary>\r
+ Class to define a SimpleGrid\r
+ </summary>\r
</member>\r
</members>\r
</doc>
\ No newline at end of file
<body>\r
\r
<div id='explanation'>\r
-Base Library: \r
+Base Library:\r
<script type='text/javascript'>\r
document.write(Rico.Lib+' '+Rico.LibVersion);\r
</script>\r
<hr>\r
This example demonstrates how Rico can convert an existing HTML table into\r
-a much more usable LiveGrid. \r
+a much more usable LiveGrid.\r
LiveGrid provides scrolling, column resizing, filtering, and sorting capabilities.\r
Click on a cell to see available actions.\r
-<p style='font-size:smaller;'>Data source: <a href="http://www.un.org/esa/population/unpop.htm">Population Division of the \r
-Department of Economic and Social Affairs of the United Nations Secretariat</a> (2009). \r
-<em>World Population Prospects: The 2008 Revision. Highlights.</em> New York: United Nations. </p> \r
+<p style='font-size:smaller;'>Data source: <a href="http://www.un.org/esa/population/unpop.htm">Population Division of the\r
+Department of Economic and Social Affairs of the United Nations Secretariat</a> (2009).\r
+<em>World Population Prospects: The 2008 Revision. Highlights.</em> New York: United Nations. </p>\r
</div>\r
\r
<Rico:LiveGrid runat='server' id='population' menuEvent='click' frozenColumns='1' highlightElem='cursorRow' defaultWidth='90' HtmlSourceId='population_data'>\r
</div>\r
\r
<Rico:LiveGrid runat='server' id='ex2notheme' fmt="json" DefaultSort='OrderID' menuEvent='click' frozenColumns='1' HdgHoverStyleId="GrayText" highlightElem='cursorRow'>\r
- <Rico:DefaultHdgStyle runat='server' bgcolor="black" color="white" align="center" />\r
- <Rico:Style runat='server' StyleID='RedHdg' bgcolor="red" color="white" align="center" />\r
- <Rico:Style runat='server' StyleID='GrayText' color="#dddddd" />\r
- <Rico:Style runat='server' StyleID='ricoLG_oddRow' bgcolor="#eeeeee" />\r
- <Rico:Style runat='server' StyleID='ricoLG_selection' bgcolor="yellow" />\r
+ <Rico:Style runat='server' StyleID='DefaultHdg' BackColor="black" ForeColor="white" HorizontalAlign="center" />\r
+ <Rico:Style runat='server' StyleID='RedHdg' BackColor="red" ForeColor="white" HorizontalAlign="center" />\r
+ <Rico:Style runat='server' StyleID='GrayText' ForeColor="#dddddd" />\r
+ <Rico:Style runat='server' StyleID='ricoLG_oddRow' BackColor="#eeeeee" />\r
+ <Rico:Style runat='server' StyleID='ricoLG_selection' BackColor="yellow" />\r
\r
<Rico:Table runat='server' TblName='orders' />\r
<Rico:TableCol runat='server' ColName='OrderID' heading='Order#' width='60' />\r
<Rico:TableCol runat='server' ColName='ShipName' heading='Ship Name' width='150' CellStyleColID='Country' />\r
<Rico:TableCol runat='server' ColName='ShipCity' heading='Ship City' width='120' CellStyleColID='Country' />\r
<Rico:TableCol runat='server' ColName='ShipCountry' heading='Ship Country' width='90' id='Country' CellStyleColID='Country' >\r
- <Rico:Style runat='server' StyleID='France' bgcolor="blue" color="white" />\r
- <Rico:Style runat='server' StyleID='Switzerland' bgcolor="red" color="white" />\r
+ <Rico:Style runat='server' StyleID='France' BackColor="blue" ForeColor="white" />\r
+ <Rico:Style runat='server' StyleID='Switzerland' BackColor="red" ForeColor="white" />\r
</Rico:TableCol>\r
- <Rico:TableCol runat='server' ColName='OrderDate' heading='Order Date' datatype='date' width='100' HdgStyleId='RedHdg' color='red' dateFmt='d mmm yyyy' />\r
- <Rico:TableCol runat='server' ColName='ShippedDate' heading='Ship Date' datatype='date' width='100' HdgStyleId='RedHdg' color='red' dateFmt='d mmm yyyy' />\r
+ <Rico:TableCol runat='server' ColName='OrderDate' heading='Order Date' datatype='date' width='100' HdgStyleId='RedHdg' ForeColor='red' dateFmt='d mmm yyyy' />\r
+ <Rico:TableCol runat='server' ColName='ShippedDate' heading='Ship Date' datatype='date' width='100' HdgStyleId='RedHdg' ForeColor='red' dateFmt='d mmm yyyy' />\r
</Rico:LiveGrid>\r
\r
</body>\r
<Rico:TableCol runat='server' ColName='ShipName' heading='Ship Name' width='150' />\r
<Rico:TableCol runat='server' ColName='ShipCity' heading='Ship City' width='120' />\r
<Rico:TableCol runat='server' ColName='ShipCountry' heading='Ship Country' width='90' />\r
- <Rico:TableCol runat='server' ColName='OrderDate' heading='Order Date' datatype='date' width='100' color='red' />\r
- <Rico:TableCol runat='server' ColName='ShippedDate' heading='Ship Date' datatype='date' width='100' color='red' />\r
+ <Rico:TableCol runat='server' ColName='OrderDate' heading='Order Date' datatype='date' width='100' ForeColor='red' />\r
+ <Rico:TableCol runat='server' ColName='ShippedDate' heading='Ship Date' datatype='date' width='100' ForeColor='red' />\r
</Rico:LiveGrid>\r
\r
</body>\r
<li><a id="demo_ex2editfilter.aspx">Editable LiveGrid (Orders)</a>\r
<li><a id="demo_ex2nosession.aspx">Editable LiveGrid without session vars</a>\r
<li><a id="demo_photos.aspx">LiveGrid sourced from flickr</a>\r
-<li><a id="demo_simplegrid.aspx">SimpleGrid</a>\r
+<li><a id="demo_simplegrid.aspx">SimpleGrid - table with subtotals</a>\r
+<li><a id="demo_simpleCustomHdg.aspx">SimpleGrid - table with custom headings/no theme</a>\r
+<li><a id="demo_simpleNumbersDates.aspx">SimpleGrid - number and date formats</a>\r
<li><a id="demo_tree1.aspx">Tree control</a>\r
<li><a id="demo_RicoDbViewer.aspx">Northwind data browser</a>\r
</ul>\r
</div>\r
\r
<Rico:SimpleGrid runat='server' id='ex1' frozenColumns='1'>\r
- <Rico:SimpleStyle runat='server' StyleID='CatHead' bgcolor="blue" color="white" bold="true" />\r
- <Rico:SimpleStyle runat='server' StyleID='Subtotal' bgcolor="#888888" color="white" bold="true" />\r
- <Rico:SimpleStyle runat='server' StyleID='GrandTotal' bgcolor="black" color="white" bold="true" />\r
- <Rico:SimpleStyle runat='server' StyleID='Number' NumberFormat="$#,##0" align="right" />\r
- <Rico:SimpleStyle runat='server' StyleID='SubtotalNumber' NumberFormat="$#,##0" align="right" bgcolor="#888888" color="white" bold="true" />\r
- <Rico:SimpleStyle runat='server' StyleID='GrandTotalNumber' NumberFormat="$#,##0" align="right" bgcolor="black" color="white" bold="true" />\r
- <Rico:SimpleStyle runat='server' StyleID='Percent' NumberFormat="0%" align="right" />\r
- <Rico:SimpleStyle runat='server' StyleID='SubtotalPercent' NumberFormat="0%" align="right" bgcolor="#888888" color="white" bold="true" />\r
- <Rico:SimpleStyle runat='server' StyleID='GrandTotalPercent' NumberFormat="0%" align="right" bgcolor="black" color="white" bold="true" />\r
+ <Rico:Style runat='server' StyleID='CatHead' BackColor="blue" ForeColor="white" bold="true" />\r
+ <Rico:Style runat='server' StyleID='Subtotal' BackColor="#888888" ForeColor="white" bold="true" />\r
+ <Rico:Style runat='server' StyleID='GrandTotal' BackColor="black" ForeColor="white" bold="true" />\r
+ <Rico:Style runat='server' StyleID='Number' NumberFormat="$#,##0" HorizontalAlign="right" />\r
+ <Rico:Style runat='server' StyleID='SubtotalNumber' NumberFormat="$#,##0" HorizontalAlign="right" BackColor="#888888" ForeColor="white" bold="true" />\r
+ <Rico:Style runat='server' StyleID='GrandTotalNumber' NumberFormat="$#,##0" HorizontalAlign="right" BackColor="black" ForeColor="white" bold="true" />\r
+ <Rico:Style runat='server' StyleID='Percent' NumberFormat="0%" HorizontalAlign="right" />\r
+ <Rico:Style runat='server' StyleID='SubtotalPercent' NumberFormat="0%" HorizontalAlign="right" BackColor="#888888" ForeColor="white" bold="true" />\r
+ <Rico:Style runat='server' StyleID='GrandTotalPercent' NumberFormat="0%" HorizontalAlign="right" BackColor="black" ForeColor="white" bold="true" />\r
\r
<Rico:SimpleCol runat='server' heading="Product" width='200' />\r
<Rico:SimpleCol runat='server' heading="Gross Sales" />\r
Rico.addClass(this.content, Rico.theme.calendar || 'ricoCalContainer');
this.content.style.display='block'; // override jquery ui
+ // Navigation controls
+ this.heading=this.content.appendChild(document.createElement("div"));
+ this.heading.className='RicoCalHeading';
+ if (Rico.theme.calendarHeading) Rico.addClass(this.heading,Rico.theme.calendarHeading)
+ var monthHdg=this._createTitleSection('Month');
+ this.heading.appendChild(monthHdg);
+ this.heading.appendChild(this._createTitleSection('Year'));
+ new Rico.HoverSet(this.heading.getElementsByTagName('a'));
+ if (this.position == 'absolute') this.heading.appendChild(Rico.closeButton(Rico.eventHandle(this,'close')));
+
this.maintab=document.createElement("table");
this.maintab.cellSpacing=2;
this.maintab.cellPadding=0;
this.styles[i]='ricoCal'+dow;
}
- // Navigation controls
- this.heading=this.content.appendChild(document.createElement("div"));
- this.heading.className='RicoCalHeading';
- if (Rico.theme.calendarHeading) Rico.addClass(this.heading,Rico.theme.calendarHeading)
- var d2=this.heading.appendChild(document.createElement("div"));
- d2.className='RicoCalHeadingInner';
- d2.appendChild(this._createTitleSection('Month'));
- d2.appendChild(this._createTitleSection('Year'));
- new Rico.HoverSet(this.heading.getElementsByTagName('a'));
- new Rico.HoverSet(this.tbody.getElementsByTagName('td'),{ hoverNodes: function(e) { return e.innerHTML.match(/^\d+$/) ? [e] : []; } });
- if (this.position == 'absolute') this.heading.appendChild(Rico.closeButton(Rico.eventHandle(this,'close')));
-
// table footer (today)
if (this.options.showToday) {
this.tfoot=this.maintab.createTFoot();
Rico.eventBind(this.todayCell,"click", Rico.eventHandle(this,'selectNow'), false);
}
this.content.appendChild(this.maintab);
+ new Rico.HoverSet(this.tbody.getElementsByTagName('td'),{ hoverNodes: function(e) { return e.innerHTML.match(/^\d+$/) ? [e] : []; } });
// month selector
this.monthPopup=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);
- var tab=document.createElement("table");
- tab.cellPadding=2;
- tab.cellSpacing=0;
- tab.border=0;
- tab.style.borderCollapse='separate';
- tab.style.margin='0px';
- r=tab.insertRow(-1);
- this.yearLabel=r.insertCell(-1);
- this.yearLabel.colSpan=3;
- this.yearLabel.innerHTML=Rico.getPhraseById("calYearRange",this.options.minDate.getFullYear(),this.options.maxDate.getFullYear());
- r=tab.insertRow(-1);
- c=r.insertCell(-1);
- this.yearInput=c.appendChild(document.createElement("input"));
+ var p1=document.createElement("p");
+ p1.innerHTML=Rico.getPhraseById("calYearRange",this.options.minDate.getFullYear(),this.options.maxDate.getFullYear());
+ var p2=document.createElement("p");
+ this.yearInput=p2.appendChild(document.createElement("input"));
this.yearInput.maxlength=4;
this.yearInput.size=4;
Rico.eventBind(this.yearInput,"keyup", Rico.eventHandle(this,'yearKey'), false);
- c=r.insertCell(-1);
- var a=Rico.floatButton('Checkmark', Rico.eventHandle(this,'processPopUpYear'));
- Rico.setStyle(a.firstChild,{ margin:"0px", padding:"0px", border:"none" });
- c.appendChild(a);
- c=r.insertCell(-1);
+ a=Rico.floatButton('Checkmark', Rico.eventHandle(this,'processPopUpYear'));
+ p2.appendChild(a);
a=Rico.floatButton('Cancel', Rico.eventHandle(this,'popDownYear'));
- Rico.setStyle(a.firstChild,{ margin:"0px", padding:"0px", border:"none" });
- c.appendChild(a);
- this.yearPopup.content.appendChild(tab);
+ p2.appendChild(a);
+ this.yearPopup.content.appendChild(p1);
+ this.yearPopup.content.appendChild(p2);
this.container.appendChild(this.yearPopup.container);
this.yearPopup.container.style.left='';
this.yearPopup.container.style.right='5px';
var a=s.appendChild(document.createElement("a"));
a.className='Rico_leftArrow';
- if (Rico.theme.leftArrowAnchor) Rico.addClass(a,Rico.theme.leftArrowAnchor);
a.appendChild(this.createNavArrow('dec'+section,'left'));
- a=s.appendChild(document.createElement("a"));
- a.style.display='inline';
+ var a=s.appendChild(document.createElement("a"));
Rico.eventBind(a,"click", Rico.eventHandle(this,'popUp'+section), false);
this['title'+section]=a;
a=s.appendChild(document.createElement("a"));
a.className='Rico_rightArrow';
- if (Rico.theme.rightArrowAnchor) Rico.addClass(a,Rico.theme.rightArrowAnchor);
a.appendChild(this.createNavArrow('inc'+section,'right'));
return s
},
createNavArrow: function(funcname,direction) {
var span=document.createElement("span");
span.className=Rico.theme[direction+'Arrow'] || 'rico-icon Rico_'+direction+'Arrow';
+ span.style.display="inline-block";
Rico.eventBind(span,"click", Rico.eventHandle(this,funcname), false);
return span;
},
return;
}
this.popDownMonth();
- this.yearPopup.openPopup(null, this.heading.offsetHeight+2);
this.yearInput.disabled=false;
this.yearInput.value=''; // this.yearSelected
- this.yearInput.focus();
+ this.yearPopup.openPopup(null, this.heading.offsetHeight+2);
+ var self=this;
+ setTimeout(function() { self.yearInput.focus(); }, 10); // ie8 has issues without this delay
return false;
},
div.RicoCalHeading a:link, div.RicoCalHeading a:visited {\r
color:#000;\r
}\r
-.ricoCalContainer .RicoCalHeadingInner {\r
- width: 15em;\r
+span.RicoCalMonthHeading {\r
+ margin: 0px 1em 0px 1.3em !ie;\r
}\r
.ricoCalContainer tfoot td {\r
border-top : 1px solid #523A0B;\r
a.RicoButton {\r
-moz-border-radius: 6px;\r
-webkit-border-radius: 6px;\r
+ border-radius: 6px;\r
}\r
\r
\r
}\r
\r
a.RicoButtonAnchor {\r
- padding: 1px 0;\r
- margin: 1px;\r
- position: relative;\r
+ padding: 1px;\r
+ margin: 0px 3px;\r
cursor: pointer;\r
- float: left;\r
+ border: 1px outset;\r
}\r
\r
a.RicoButtonAnchorNative {\r
}\r
\r
a.RicoButtonAnchor span {\r
- margin: 0 1px;\r
- float: left;\r
+ display: inline-block;\r
+ vertical-align: top;\r
}\r
\r
a.RicoButtonAnchorNative:hover {\r
\r
.RicoCalHeading {\r
font-size:8pt !important;\r
- font-weight: bold;\r
- text-align:center;\r
+ text-align: center;\r
+ text-align: left !ie; /* ie6+ie7 */\r
+ padding: 0.3em 0px;\r
}\r
\r
.RicoCalHeading a {\r
text-decoration: none;\r
+ font-weight: bold !important;\r
+ margin: 0px;\r
+ padding: 0px 0.2em;\r
+ text-align: center;\r
+ border: 0px none !important;\r
}\r
\r
-.ui-datepicker .RicoCalHeadingInner {\r
- height: 1.8em;\r
- position: relative;\r
- width: 16em;\r
+.ui-datepicker-title > .Rico_leftArrow, .ui-datepicker-title > .Rico_rightArrow {\r
+ position:relative; \r
+ top:3px;\r
}\r
\r
-.ricoCalContainer .RicoCalHeadingInner {\r
- height: 1.3em;\r
- position: relative;\r
- width: 16em;\r
- padding: 2px;\r
+*+html .ui-datepicker-title > .Rico_leftArrow, *+html .ui-datepicker-title > .Rico_rightArrow {\r
+ top:-2px; /* ie7 */\r
}\r
\r
-.RicoCalHeading > .RicoCalHeadingInner {\r
- margin: auto;\r
+.ui-datepicker-title span {\r
+ text-indent: 0px;\r
}\r
\r
table.ricoCalTab {\r
background-color: #FDD;\r
}\r
\r
-span.RicoCalMonthHeading {\r
- position:absolute;\r
- left: 0px;\r
+span.RicoCalMonthHeading, span.RicoCalYearHeading {\r
font-weight:bold;\r
- margin: 0px 1em !important;\r
+ margin: 0px 1em;\r
padding: 0px;\r
- display: block;\r
- width: 6.5em;\r
- text-align: center;\r
}\r
\r
-span.RicoCalYearHeading {\r
- position:absolute;\r
- right: 0px;\r
- font-weight:bold;\r
- margin: 0px 1em !important;\r
- padding: 0px;\r
- display: block;\r
- width: 7em;\r
- text-align: center;\r
+span.RicoCalMonthHeading {\r
+ margin: 0px 1em 0px 3em !ie;\r
}\r
\r
span.Rico_leftArrow {\r
div.ricoCalYearPrompt {\r
margin: 0px;\r
padding: 3px;\r
- display: block;\r
border:1px solid #666666;\r
background-color: #FEE;\r
}\r
\r
-.ricoCalYearPrompt td {\r
- white-space: nowrap;\r
+.ricoCalYearPrompt p {\r
+ margin: 0px;\r
+ padding: 3px;\r
}\r
\r
.ricoCalYearPrompt img {\r
height: 17px;\r
background-position: -10px -186px;\r
}\r
+\r
+a span {\r
+ cursor: pointer;\r
+}\r
+\r
span.ricoClear {\r
display:-moz-inline-box;\r
display:inline-block;\r
- cursor: pointer;\r
}\r
\r
span.RicoCheckmark {\r
}},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);
-var e=Rico.$(this.id);
-if(e){this.setDiv(e)
+var d=Rico.$(this.id);
+if(d){this.setDiv(d)
}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.heading=this.content.appendChild(document.createElement("div"));
+this.heading.className="RicoCalHeading";
+if(Rico.theme.calendarHeading){Rico.addClass(this.heading,Rico.theme.calendarHeading)
+}var k=this._createTitleSection("Month");
+this.heading.appendChild(k);
+this.heading.appendChild(this._createTitleSection("Year"));
+new Rico.HoverSet(this.heading.getElementsByTagName("a"));
+if(this.position=="absolute"){this.heading.appendChild(Rico.closeButton(Rico.eventHandle(this,"close")))
+}this.maintab=document.createElement("table");
this.maintab.cellSpacing=2;
this.maintab.cellPadding=0;
this.maintab.border=0;
this.maintab.className="ricoCalTab";
if(Rico.theme.calendarTable){Rico.addClass(this.maintab,Rico.theme.calendarTable)
}this.tbody=Rico.getTBody(this.maintab);
-var d,l,h,g,k,n,m,o,f;
+var b,l,g,f,h,p,m,q,e;
this.colStart=this.options.showWeekNumber?1:0;
-for(h=0;
-h<7;
-h++){d=this.tbody.insertRow(-1);
-d.className="row"+h;
+for(g=0;
+g<7;
+g++){b=this.tbody.insertRow(-1);
+b.className="row"+g;
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"
+l++){b.insertCell(-1)
+}}b=this.tbody.rows[0];
+b.className="ricoCalDayNames";
+if(this.options.showWeekNumber){b.cells[0].innerHTML=this.weekString;
+for(g=0;
+g<7;
+g++){this.tbody.rows[g].cells[0].className="ricoCalWeekNum"
}}this.styles=[];
-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]:[]
-}});
-if(this.position=="absolute"){this.heading.appendChild(Rico.closeButton(Rico.eventHandle(this,"close")))
+for(g=0;
+g<7;
+g++){p=(g+this.options.startAt)%7;
+b.cells[g+this.colStart].innerHTML=Rico.dayAbbr(p);
+this.styles[g]="ricoCal"+p
}if(this.options.showToday){this.tfoot=this.maintab.createTFoot();
-d=this.tfoot.insertRow(-1);
-this.todayCell=d.insertCell(-1);
+b=this.tfoot.insertRow(-1);
+this.todayCell=b.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);
+new Rico.HoverSet(this.tbody.getElementsByTagName("td"),{hoverNodes:function(a){return a.innerHTML.match(/^\d+$/)?[a]:[]
+}});
this.monthPopup=new Rico.Popup(document.createElement("div"));
this.monthPopup.closePopup();
-f=document.createElement("table");
-f.className="ricoCalMenu";
-if(Rico.theme.calendarPopdown){Rico.addClass(f,Rico.theme.calendarPopdown)
-}f.cellPadding=2;
-f.cellSpacing=0;
-f.border=0;
-f.style.borderCollapse="separate";
-f.style.margin="0px";
-for(h=0;
-h<4;
-h++){d=f.insertRow(-1);
+e=document.createElement("table");
+e.className="ricoCalMenu";
+if(Rico.theme.calendarPopdown){Rico.addClass(e,Rico.theme.calendarPopdown)
+}e.cellPadding=2;
+e.cellSpacing=0;
+e.border=0;
+e.style.borderCollapse="separate";
+e.style.margin="0px";
for(g=0;
-g<3;
-g++){l=d.insertCell(-1);
+g<4;
+g++){b=e.insertRow(-1);
+for(f=0;
+f<3;
+f++){l=b.insertCell(-1);
m=document.createElement("a");
-m.innerHTML=Rico.monthAbbr(h*3+g);
-m.name=h*3+g;
+m.innerHTML=Rico.monthAbbr(g*3+f);
+m.name=g*3+f;
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);
+}}new Rico.HoverSet(e.getElementsByTagName("a"));
+this.monthPopup.content.appendChild(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)
-}var f=document.createElement("table");
-f.cellPadding=2;
-f.cellSpacing=0;
-f.border=0;
-f.style.borderCollapse="separate";
-f.style.margin="0px";
-d=f.insertRow(-1);
-this.yearLabel=d.insertCell(-1);
-this.yearLabel.colSpan=3;
-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"));
+}var o=document.createElement("p");
+o.innerHTML=Rico.getPhraseById("calYearRange",this.options.minDate.getFullYear(),this.options.maxDate.getFullYear());
+var n=document.createElement("p");
+this.yearInput=n.appendChild(document.createElement("input"));
this.yearInput.maxlength=4;
this.yearInput.size=4;
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("Checkmark",Rico.eventHandle(this,"processPopUpYear"));
+n.appendChild(m);
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);
+n.appendChild(m);
+this.yearPopup.content.appendChild(o);
+this.yearPopup.content.appendChild(n);
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)"
+for(g=0;
+g<m.length;
+g++){m[g].href="javascript:void(0)"
}Rico.eventBind(this.tbody,"click",Rico.eventHandle(this,"saveAndClose"));
this.close();
this.bPageLoaded=true
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"));
-b=c.appendChild(document.createElement("a"));
-b.style.display="inline";
+b.appendChild(this.createNavArrow("dec"+d,"left"));
+var b=c.appendChild(document.createElement("a"));
Rico.eventBind(b,"click",Rico.eventHandle(this,"popUp"+d),false);
this["title"+d]=b;
b=c.appendChild(document.createElement("a"));
b.className="Rico_rightArrow";
-if(Rico.theme.rightArrowAnchor){Rico.addClass(b,Rico.theme.rightArrowAnchor)
-}b.appendChild(this.createNavArrow("inc"+d,"right"));
+b.appendChild(this.createNavArrow("inc"+d,"right"));
return c
},selectNow:function(){var a=new Date();
this.dateNow=a.getDate();
this.constructCalendar()
},createNavArrow:function(a,c){var b=document.createElement("span");
b.className=Rico.theme[c+"Arrow"]||"rico-icon Rico_"+c+"Arrow";
+b.style.display="inline-block";
Rico.eventBind(b,"click",Rico.eventHandle(this,a),false);
return b
},isValidMonth:function(a,b){if(a<this.options.minDate.getFullYear()){return false
},popDownMonth:function(){this.monthPopup.closePopup()
},popDownYear:function(){this.yearPopup.closePopup();
this.yearInput.disabled=true
-},popUpYear:function(a){Rico.eventStop(a);
+},popUpYear:function(b){Rico.eventStop(b);
if(this.yearPopup.visible()){this.popDownYear();
return
}this.popDownMonth();
-this.yearPopup.openPopup(null,this.heading.offsetHeight+2);
this.yearInput.disabled=false;
this.yearInput.value="";
-this.yearInput.focus();
+this.yearPopup.openPopup(null,this.heading.offsetHeight+2);
+var a=this;
+setTimeout(function(){a.yearInput.focus()
+},10);
return false
},yearKey:function(a){switch(Rico.eventKey(a)){case 27:this.popDownYear();
Rico.eventStop(a);
this.loadXMLDoc(g.name)
}}};
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:[]};
+}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:null,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.hdrCells=[];
this.headerColCnt=0;
this.headerRowIdx=0;
for(a=0;
a<2;
a++){Rico.log("simpleGridInit "+a);
-this.tabs[a]=document.getElementById(this.tableId+"_tab"+a);
+this.tabs[a]=Rico.$(this.tableId+"_tab"+a);
if(!this.tabs[a]){return
-}this.hdrTabs[a]=document.getElementById(this.tableId+"_tab"+a+"h");
+}this.hdrTabs[a]=Rico.$(this.tableId+"_tab"+a+"h");
if(!this.hdrTabs[a]){return
}this.thead[a]=this.hdrTabs[a];
this.tbody[a]=this.tabs[a];