//>>built require({cache:{"url:dojox/grid/resources/_Grid.html":'\x3cdiv hidefocus\x3d"hidefocus" role\x3d"grid" dojoAttachEvent\x3d"onmouseout:_mouseOut"\x3e\r\n\t\x3cdiv class\x3d"dojoxGridMasterHeader" dojoAttachPoint\x3d"viewsHeaderNode" role\x3d"presentation"\x3e\x3c/div\x3e\r\n\t\x3cdiv class\x3d"dojoxGridMasterView" dojoAttachPoint\x3d"viewsNode" role\x3d"presentation"\x3e\x3c/div\x3e\r\n\t\x3cdiv class\x3d"dojoxGridMasterMessages" style\x3d"display: none;" dojoAttachPoint\x3d"messagesNode"\x3e\x3c/div\x3e\r\n\t\x3cspan dojoAttachPoint\x3d"lastFocusNode" tabindex\x3d"0"\x3e\x3c/span\x3e\r\n\x3c/div\x3e\r\n'}}); define("dojo/_base/kernel ../main dojo/_base/declare ./_Events ./_Scroller ./_Layout ./_View ./_ViewManager ./_RowManager ./_FocusManager ./_EditManager ./Selection ./_RowSelector ./util dijit/_Widget dijit/_TemplatedMixin dijit/CheckedMenuItem dojo/text!./resources/_Grid.html dojo/string dojo/_base/array dojo/_base/lang dojo/_base/sniff dojox/html/metrics dojo/_base/html dojo/query dojo/dnd/common dojo/i18n!dijit/nls/loading".split(" "),function(h,q,l,x,y,z,J,A,B,C,D,E,r,t,F,G,u,H,v,e,f,I,w,d,p){h.isCopyKey|| (h.isCopyKey=h.dnd.getCopyKeyState);l=l("dojox.grid._Grid",[F,G,x],{templateString:H,classTag:"dojoxGrid",rowCount:5,keepRows:75,rowsPerPage:25,autoWidth:!1,initialWidth:"",autoHeight:"",rowHeight:0,autoRender:!0,defaultHeight:"15em",height:"",structure:null,elasticView:-1,singleClickEdit:!1,selectionMode:"extended",rowSelector:"",columnReordering:!1,headerMenu:null,placeholderLabel:"GridColumns",selectable:!1,_click:null,loadingMessage:"\x3cspan class\x3d'dojoxGridLoading'\x3e${loadingState}\x3c/span\x3e", errorMessage:"\x3cspan class\x3d'dojoxGridError'\x3e${errorState}\x3c/span\x3e",noDataMessage:"",escapeHTMLInData:!0,formatterScope:null,editable:!1,summary:"",_setSummaryAttr:"domNode",sortInfo:0,_placeholders:null,_layoutClass:z,buildRendering:function(){this.inherited(arguments);this.domNode.getAttribute("tabIndex")||(this.domNode.tabIndex="0");this.createScroller();this.createLayout();this.createViews();this.createManagers();this.createSelection();this.connect(this.selection,"onSelected","onSelected"); this.connect(this.selection,"onDeselected","onDeselected");this.connect(this.selection,"onChanged","onSelectionChanged");w.initOnFontResize();this.connect(w,"onFontResize","textSizeChanged");t.funnelEvents(this.domNode,this,"doKeyEvent",t.keyEvents);"none"!=this.selectionMode&&this.domNode.setAttribute("aria-multiselectable","single"==this.selectionMode?"false":"true");d.addClass(this.domNode,this.classTag);this.isLeftToRight()||d.addClass(this.domNode,this.classTag+"Rtl");0a?a=!0:0===a&&(a=!1));this.autoHeight=a;this._autoHeight="boolean"==typeof a?a:"number"==typeof a?a>=this.get("rowCount"):!1;this._started&&!b&&this.render()}, _getRowCountAttr:function(){return this.updating&&this.invalidated&&void 0!=this.invalidated.rowCount?this.invalidated.rowCount:this.rowCount},textSizeChanged:function(){this.render()},sizeChange:function(){this.update()},createManagers:function(){this.rows=new B(this);this.focus=new C(this);this.edit=new D(this)},createSelection:function(){this.selection=new E(this)},createScroller:function(){this.scroller=new y;this.scroller.grid=this;this.scroller.renderRow=f.hitch(this,"renderRow");this.scroller.removeRow= f.hitch(this,"rowRemoved")},createLayout:function(){this.layout=new this._layoutClass(this);this.connect(this.layout,"moveColumn","onMoveColumn")},onMoveColumn:function(){this.update()},onResizeColumn:function(a){},createViews:function(){this.views=new A(this);this.views.createView=f.hitch(this,"createView")},createView:function(a,b){a=new (f.getObject(a))({grid:this,index:b});this.viewsNode.appendChild(a.domNode);this.viewsHeaderNode.appendChild(a.headerNode);this.views.addView(a);d.attr(this.domNode, "align",this.isLeftToRight()?"left":"right");return a},buildViews:function(){for(var a=0,b;b=this.layout.structure[a];a++)this.createView(b.type||q._scopeName+".grid._View",a).setStructure(b);this.scroller.setContentNodes(this.views.getContentNodes())},_setStructureAttr:function(a){a&&f.isString(a)&&(h.deprecated("dojox.grid._Grid.set('structure', 'objVar')","use dojox.grid._Grid.set('structure', objVar) instead","2.0"),a=f.getObject(a));this.structure=a;if(!a)if(this.layout.structure)a=this.layout.structure; else return;this.views.destroyViews();this.focus.focusView=null;a!==this.layout.structure&&this.layout.setStructure(a);this._structureChanged()},setStructure:function(a){h.deprecated("dojox.grid._Grid.setStructure(obj)","use dojox.grid._Grid.set('structure', obj) instead.","2.0");this._setStructureAttr(a)},getColumnTogglingItems:function(){var a,b=[];a=e.map(this.layout.cells,function(a){a.menuItems||(a.menuItems=[]);var c=this,d=new u({label:a.name,checked:!a.hidden,_gridCell:a,onChange:function(a){if(c.layout.setColumnVisibility(this._gridCell.index, a)){var b=this._gridCell.menuItems;1=this.get("rowCount")?this.scroller.windowHeight=b:this.scroller.windowHeight=Math.max(this.domNode.clientHeight-a,0)},startup:function(){this._started||(this.inherited(arguments),this.autoRender&&this.render())},render:function(){this.domNode&&this._started&&(this.hasLayout()?(this.update=this.defaultUpdate,this._render()):this.scroller.init(0,this.keepRows,this.rowsPerPage))},_render:function(){this.scroller.init(this.get("rowCount"),this.keepRows, this.rowsPerPage);this.prerender();this.setScrollTop(0);this.postrender()},prerender:function(){this.keepRows=this._autoHeight?0:this.keepRows;this.scroller.setKeepInfo(this.keepRows);this.views.render();this._resize()},postrender:function(){this.postresize();this.focus.initFocusView();d.setSelectable(this.domNode,this.selectable)},postresize:function(){if(this._autoHeight){var a=Math.max(this.views.measureContent())+"px";this.viewsNode.style.height=a}},renderRow:function(a,b){this.views.renderRow(a, b,this._skipRowRenormalize)},rowRemoved:function(a){this.views.rowRemoved(a)},invalidated:null,updating:!1,beginUpdate:function(){this.invalidated=[];this.updating=!0},endUpdate:function(){this.updating=!1;var a=this.invalidated,b;if(a.all)this.update();else if(void 0!=a.rowCount)this.updateRowCount(a.rowCount);else for(b in a)this.updateRow(Number(b));this.invalidated=[]},defaultUpdate:function(){this.domNode&&(this.updating?this.invalidated.all=!0:(this.lastScrollTop=this.scrollTop,this.prerender(), this.scroller.invalidateNodes(),this.setScrollTop(this.lastScrollTop),this.postrender()))},update:function(){this.render()},updateRow:function(a){a=Number(a);this.updating?this.invalidated[a]=!0:(this.views.updateRow(a),this.scroller.rowHeightChanged(a))},updateRows:function(a,b){a=Number(a);b=Number(b);var c;if(this.updating)for(c=0;cthis.scrollRedrawThreshold||this.delayScroll){this.delayScroll=!0;this.scrollTop=a;this.views.setScrollTop(a);this._pendingScroll&&window.clearTimeout(this._pendingScroll);var c=this;this._pendingScroll=window.setTimeout(function(){delete c._pendingScroll; c.finishScrollJob()},200)}else this.setScrollTop(a)}else this.setScrollTop(a)},finishScrollJob:function(){this.delayScroll=!1;this.setScrollTop(this.scrollTop)},setScrollTop:function(a){this.scroller.scroll(this.views.setScrollTop(a))},scrollToRow:function(a){this.setScrollTop(this.scroller.findScrollTop(a)+1)},styleRowNode:function(a,b){b&&this.rows.styleRowNode(a,b)},_mouseOut:function(a){this.rows.setOverRow(-2)},getCell:function(a){return this.layout.cells[a]},setCellWidth:function(a,b){this.getCell(a).unitWidth= b},getCellName:function(a){return"Cell "+a.index},canSort:function(a){},sort:function(){},getSortAsc:function(a){a=void 0==a?this.sortInfo:a;return 0=l+n.__span&&(k++,l+=n.__span,n=a.structure[k]):(l= 0,n=a.structure[0]);var g={name:f.trim(d.attr(b,"name")||b.innerHTML),colSpan:parseInt(d.attr(b,"colspan")||1,10),type:f.trim(d.attr(b,"cellType")||""),id:f.trim(d.attr(b,"id")||"")};h+=g.colSpan;var p=d.attr(b,"rowspan");p&&(g.rowSpan=p);d.hasAttr(b,"width")&&(g.width=m(b));d.hasAttr(b,"relWidth")&&(g.relWidth=window.parseInt(d.attr(b,"relWidth"),10));d.hasAttr(b,"hidden")&&(g.hidden="true"==d.attr(b,"hidden")||!0===d.attr(b,"hidden"));e&&e(b,g);g.type=g.type?f.getObject(g.type):q.grid.cells.Cell; g.type&&g.type.markupFactory&&g.type.markupFactory(b,g);n.cells[c]||(n.cells[c]=[]);n.cells[c].push(g)})}));return new c(a,b)};return l});