//>>built
require({cache:{"url:dojox/grid/resources/View.html":'\x3cdiv class\x3d"dojoxGridView" role\x3d"presentation"\x3e\n\t\x3cdiv class\x3d"dojoxGridHeader" dojoAttachPoint\x3d"headerNode" role\x3d"presentation"\x3e\n\t\t\x3cdiv dojoAttachPoint\x3d"headerNodeContainer" style\x3d"width:9000em" role\x3d"presentation"\x3e\n\t\t\t\x3cdiv dojoAttachPoint\x3d"headerContentNode" role\x3d"row"\x3e\x3c/div\x3e\n\t\t\x3c/div\x3e\n\t\x3c/div\x3e\n\t\x3cinput type\x3d"checkbox" class\x3d"dojoxGridHiddenFocus" dojoAttachPoint\x3d"hiddenFocusNode" aria-hidden\x3d"true" /\x3e\n\t\x3cinput type\x3d"checkbox" class\x3d"dojoxGridHiddenFocus" aria-hidden\x3d"true" /\x3e\n\t\x3cdiv class\x3d"dojoxGridScrollbox" dojoAttachPoint\x3d"scrollboxNode" role\x3d"presentation"\x3e\n\t\t\x3cdiv class\x3d"dojoxGridContent" dojoAttachPoint\x3d"contentNode" hidefocus\x3d"hidefocus" role\x3d"presentation"\x3e\x3c/div\x3e\n\t\x3c/div\x3e\n\x3c/div\x3e\n'}});
define("dojox/grid/_View","dojo dijit/registry ../main dojo/_base/declare dojo/_base/array dojo/_base/lang dojo/_base/connect dojo/_base/sniff dojo/query dojo/_base/window dojo/text!./resources/View.html dojo/dnd/Source dijit/_Widget dijit/_TemplatedMixin dojox/html/metrics ./util dojo/_base/html ./_Builder dojo/dnd/Avatar dojo/dnd/Manager".split(" "),function(C,y,D,z,t,n,u,l,w,v,x,p,E,F,A,q,e,B,G,m){x=z("dojox.grid._View",[E,F],{defaultWidth:"18em",viewWidth:"",templateString:x,classTag:"dojoxGrid",
marginBottom:0,rowPad:2,_togglingColumn:-1,_headerBuilderClass:B._HeaderBuilder,_contentBuilderClass:B._ContentBuilder,postMixInProperties:function(){this.rowNodes={}},postCreate:function(){this.connect(this.scrollboxNode,"onscroll","doscroll");q.funnelEvents(this.contentNode,this,"doContentEvent","mouseover mouseout click dblclick contextmenu mousedown".split(" "));q.funnelEvents(this.headerNode,this,"doHeaderEvent","dblclick mouseover mouseout mousemove mousedown click contextmenu".split(" "));
this.content=new this._contentBuilderClass(this);this.header=new this._headerBuilderClass(this);this.grid.isLeftToRight()||(this.headerNodeContainer.style.width="")},destroy:function(){e.destroy(this.headerNode);delete this.headerNode;for(var a in this.rowNodes)this._cleanupRowWidgets(this.rowNodes[a]),e.destroy(this.rowNodes[a]);this.rowNodes={};this.source&&this.source.destroy();this.inherited(arguments)},focus:function(){l("ie")||l("webkit")||l("opera")?this.hiddenFocusNode.focus():this.scrollboxNode.focus()},
setStructure:function(a){a=this.structure=a;a.width&&!isNaN(a.width)?this.viewWidth=a.width+"em":this.viewWidth=a.width||(a.noscroll?"auto":this.viewWidth);this._onBeforeRow=a.onBeforeRow||function(){};this._onAfterRow=a.onAfterRow||function(){};if(this.noscroll=a.noscroll)this.scrollboxNode.style.overflow="hidden";this.simpleStructure=1==a.cells.length;this.testFlexCells();this.updateStructure()},_cleanupRowWidgets:function(a){a&&t.forEach(w("[widgetId]",a).map(y.byNode),function(b){b._destroyOnRemove?
(b.destroy(),delete b):b.domNode&&b.domNode.parentNode&&b.domNode.parentNode.removeChild(b.domNode)})},onBeforeRow:function(a,b){this._onBeforeRow(a,b);0<=a&&this._cleanupRowWidgets(this.getRowNode(a))},onAfterRow:function(a,b,f){this._onAfterRow(a,b,f);var c=this.grid;t.forEach(w(".dojoxGridStubNode",f),function(d){if(d&&d.parentNode){var g=d.getAttribute("linkWidget"),h=window.parseInt(e.attr(d,"cellIdx"),10);c.getCell(h);(g=y.byId(g))?(d.parentNode.replaceChild(g.domNode,d),g._started||g.startup(),
C.destroy(d)):d.innerHTML=""}},this)},testFlexCells:function(){this.flexCells=!1;for(var a=0,b;b=this.structure.cells[a];a++)for(var f=0,c;c=b[f];f++)c.view=this,this.flexCells=this.flexCells||c.isFlex();return this.flexCells},updateStructure:function(){this.header.update();this.content.update()},getScrollbarWidth:function(){var a=this.hasVScrollbar(),b=e.style(this.scrollboxNode,"overflow");this.noscroll||!b||"hidden"==b?a=!1:"scroll"==b&&(a=!0);return a?A.getScrollbar().w:0},getColumnsWidth:function(){var a=
this.headerContentNode;return a&&a.firstChild?a.firstChild.offsetWidth||e.style(a.firstChild,"width"):0},setColumnsWidth:function(a){this.headerContentNode.firstChild.style.width=a+"px";this.viewWidth&&(this.viewWidth=a+"px")},getWidth:function(){return this.viewWidth||this.getColumnsWidth()+this.getScrollbarWidth()+"px"},getContentWidth:function(){return Math.max(0,e._getContentBox(this.domNode).w-this.getScrollbarWidth())+"px"},render:function(){this.scrollboxNode.style.height="";this.renderHeader();
0<=this._togglingColumn&&(this.setColumnsWidth(this.getColumnsWidth()-this._togglingColumn),this._togglingColumn=-1);var a=this.grid.layout.cells,b=n.hitch(this,function(c,d){!this.grid.isLeftToRight()&&(d=!d);for(var g=d?-1:1,h=this.header.getCellNodeIndex(c)+g,k=a[h];k&&k.getHeaderNode()&&"none"==k.getHeaderNode().style.display;)h+=g,k=a[h];return k?k.getHeaderNode():null});if(this.grid.columnReordering&&this.simpleStructure){this.source&&this.source.destroy();this.bottomMarker&&e.destroy(this.bottomMarker);
this.bottomMarker=e.byId("dojoxGrid_bottomMarker");this.topMarker&&e.destroy(this.topMarker);this.topMarker=e.byId("dojoxGrid_topMarker");this.bottomMarker||(this.bottomMarker=e.create("div",{id:"dojoxGrid_bottomMarker","class":"dojoxGridColPlaceBottom"},v.body()),this._hide(this.bottomMarker),this.topMarker=e.create("div",{id:"dojoxGrid_topMarker","class":"dojoxGridColPlaceTop"},v.body()),this._hide(this.topMarker));this.arrowDim=e.contentBox(this.bottomMarker);var f=e.contentBox(this.headerContentNode.firstChild.rows[0]).h;
this.source=new p(this.headerContentNode.firstChild.rows[0],{horizontal:!0,accept:["gridColumn_"+this.grid.id],viewIndex:this.index,generateText:!1,onMouseDown:n.hitch(this,function(c){this.header.decorateEvent(c);if((this.header.overRightResizeArea(c)||this.header.overLeftResizeArea(c))&&this.header.canResize(c)&&!this.header.moveable)this.header.beginColumnResize(c);else{if(this.grid.headerMenu)this.grid.headerMenu.onCancel(!0);c.button===(9>l("ie")?1:0)&&p.prototype.onMouseDown.call(this.source,
c)}}),onMouseOver:n.hitch(this,function(c){var d=this.source;d._getChildByEvent(c)&&p.prototype.onMouseOver.apply(d,arguments)}),_markTargetAnchor:n.hitch(this,function(c){var d=this.source;if(d.current!=d.targetAnchor||d.before!=c){d.targetAnchor&&b(d.targetAnchor,d.before)&&d._removeItemClass(b(d.targetAnchor,d.before),d.before?"After":"Before");p.prototype._markTargetAnchor.call(d,c);var g=c?d.targetAnchor:b(d.targetAnchor,d.before);c=0;g||(g=d.targetAnchor,c=e.contentBox(g).w+this.arrowDim.w/
2+2);g=e.position(g,!0);c=Math.floor(g.x-this.arrowDim.w/2+c);e.style(this.bottomMarker,"visibility","visible");e.style(this.topMarker,"visibility","visible");e.style(this.bottomMarker,{left:c+"px",top:f+g.y+"px"});e.style(this.topMarker,{left:c+"px",top:g.y-this.arrowDim.h+"px"});d.targetAnchor&&b(d.targetAnchor,d.before)&&d._addItemClass(b(d.targetAnchor,d.before),d.before?"After":"Before")}}),_unmarkTargetAnchor:n.hitch(this,function(){var c=this.source;c.targetAnchor&&(c.targetAnchor&&b(c.targetAnchor,
c.before)&&c._removeItemClass(b(c.targetAnchor,c.before),c.before?"After":"Before"),this._hide(this.bottomMarker),this._hide(this.topMarker),p.prototype._unmarkTargetAnchor.call(c))}),destroy:n.hitch(this,function(){u.disconnect(this._source_conn);u.unsubscribe(this._source_sub);p.prototype.destroy.call(this.source);this.bottomMarker&&(e.destroy(this.bottomMarker),delete this.bottomMarker);this.topMarker&&(e.destroy(this.topMarker),delete this.topMarker)}),onDndCancel:n.hitch(this,function(){p.prototype.onDndCancel.call(this.source);
this._hide(this.bottomMarker);this._hide(this.topMarker)})});this._source_conn=u.connect(this.source,"onDndDrop",this,"_onDndDrop");this._source_sub=u.subscribe("/dnd/drop/before",this,"_onDndDropBefore");this.source.startup()}},_hide:function(a){e.style(a,{top:"-10000px",visibility:"hidden"})},_onDndDropBefore:function(a,b,f){m.manager().target===this.source&&(this.source._targetNode=this.source.targetAnchor,this.source._beforeTarget=this.source.before,b=this.grid.views.views,a=b[a.viewIndex],b=
b[this.index],b!=a&&(a.convertColPctToFixed(),b.convertColPctToFixed()))},_onDndDrop:function(a,b,f){if(m.manager().target!==this.source)m.manager().source===this.source&&(this._removingColumn=!0);else{this._hide(this.bottomMarker);this._hide(this.topMarker);f=e.marginBox(b[0]).w;if(a.viewIndex!==this.index){var c=this.grid.views.views,d=c[a.viewIndex];c=c[this.index];d.viewWidth&&"auto"!=d.viewWidth&&d.setColumnsWidth(d.getColumnsWidth()-f);c.viewWidth&&"auto"!=c.viewWidth&&c.setColumnsWidth(c.getColumnsWidth())}f=
this.source._targetNode;d=this.source._beforeTarget;!this.grid.isLeftToRight()&&(d=!d);c=this.grid.layout;var g=this.index;delete this.source._targetNode;delete this.source._beforeTarget;var h=c.moveColumn;a=a.viewIndex;b=(b=b[0])?e.attr(b,"idx"):null;h.call(c,a,g,b,f?e.attr(f,"idx"):null,d)}},renderHeader:function(){this.headerContentNode.innerHTML=this.header.generateHtml(this._getHeaderContent);this.flexCells&&(this.contentWidth=this.getContentWidth(),this.headerContentNode.firstChild.style.width=
this.contentWidth);q.fire(this,"onAfterRow",[-1,this.structure.cells,this.headerContentNode])},_getHeaderContent:function(a){var b=a.name||a.grid.getCellName(a);/^\s+$/.test(b)&&(b="\x26nbsp;");var f=['\x3cdiv class\x3d"dojoxGridSortNode'];a.index!=a.grid.getSortIndex()?f.push('"\x3e'):f=f.concat([" ",0<a.grid.sortInfo?"dojoxGridSortUp":"dojoxGridSortDown",'"\x3e\x3cdiv class\x3d"dojoxGridArrowButtonChar"\x3e',0<a.grid.sortInfo?"\x26#9650;":"\x26#9660;",'\x3c/div\x3e\x3cdiv class\x3d"dojoxGridArrowButtonNode" role\x3d"presentation"\x3e\x3c/div\x3e',
'\x3cdiv class\x3d"dojoxGridColCaption"\x3e']);f=f.concat([b,"\x3c/div\x3e\x3c/div\x3e"]);return f.join("")},resize:function(){this.adaptHeight();this.adaptWidth()},hasHScrollbar:function(a){var b=this._hasHScroll||!1;if(void 0==this._hasHScroll||a)this.noscroll?this._hasHScroll=!1:(a=e.style(this.scrollboxNode,"overflow"),this._hasHScroll="hidden"==a?!1:"scroll"==a?!0:this.scrollboxNode.offsetWidth-this.getScrollbarWidth()<this.contentNode.offsetWidth);b!==this._hasHScroll&&this.grid.update();return this._hasHScroll},
hasVScrollbar:function(a){var b=this._hasVScroll||!1;if(void 0==this._hasVScroll||a)this.noscroll?this._hasVScroll=!1:(a=e.style(this.scrollboxNode,"overflow"),this._hasVScroll="hidden"==a?!1:"scroll"==a?!0:this.scrollboxNode.scrollHeight>this.scrollboxNode.clientHeight);b!==this._hasVScroll&&this.grid.update();return this._hasVScroll},convertColPctToFixed:function(){var a=!1;this.grid.initialWidth="";var b=w("th",this.headerContentNode),f=t.map(b,function(c,d){var g=c.style.width;e.attr(c,"vIdx",
d);if(g&&"%"==g.slice(-1))a=!0;else if(g&&"px"==g.slice(-2))return window.parseInt(g,10);return e.contentBox(c).w});return a?(t.forEach(this.grid.layout.cells,function(c,d){if(c.view==this){var g=c.view.getHeaderCellNode(c.index);if(g&&e.hasAttr(g,"vIdx")){var h=window.parseInt(e.attr(g,"vIdx"));this.setColWidth(d,f[h]);e.removeAttr(g,"vIdx")}}},this),!0):!1},adaptHeight:function(a){if(!this.grid._autoHeight){var b=this.domNode.style.height&&parseInt(this.domNode.style.height.replace(/px/,""),10)||
this.domNode.clientHeight;if(!a&&(a=this.noscroll))a:{for(var f=0;f<this.grid.views.views.length;++f)if(a=this.grid.views.views[f],a!==this&&a.hasHScrollbar()){a=!0;break a}a=!1}a&&(b-=A.getScrollbar().h);q.setStyleHeightPx(this.scrollboxNode,b)}this.hasVScrollbar(!0)},adaptWidth:function(){this.flexCells&&(this.contentWidth=this.getContentWidth(),this.headerContentNode.firstChild.style.width=this.contentWidth);var a=this.scrollboxNode.offsetWidth-this.getScrollbarWidth();this._removingColumn?(a=
Math.min(a,this.getColumnsWidth())+"px",this._removingColumn=!1):a=Math.max(a,this.getColumnsWidth())+"px";this.contentNode.style.width=a;this.hasHScrollbar(!0)},setSize:function(a,b){var f=this.domNode.style,c=this.headerNode.style;a&&(f.width=a,c.width=a);f.height=0<=b?b+"px":""},renderRow:function(a){var b=this.createRowNode(a);this.buildRow(a,b);return b},createRowNode:function(a){var b=document.createElement("div");b.className=this.classTag+"Row";this instanceof D.grid._RowSelector?e.attr(b,
"role","presentation"):(e.attr(b,"role","row"),"none"!=this.grid.selectionMode&&b.setAttribute("aria-selected","false"));b[q.gridViewTag]=this.id;b[q.rowIndexTag]=a;return this.rowNodes[a]=b},buildRow:function(a,b){this.buildRowContent(a,b);this.styleRow(a,b)},buildRowContent:function(a,b){b.innerHTML=this.content.generateHtml(a,a);this.flexCells&&this.contentWidth&&(b.firstChild.style.width=this.contentWidth);q.fire(this,"onAfterRow",[a,this.structure.cells,b])},rowRemoved:function(a){0<=a&&this._cleanupRowWidgets(this.getRowNode(a));
this.grid.edit.save(this,a);delete this.rowNodes[a]},getRowNode:function(a){return this.rowNodes[a]},getCellNode:function(a,b){var f=this.getRowNode(a);if(f)return this.content.getCellNode(f,b)},getHeaderCellNode:function(a){if(this.headerContentNode)return this.header.getCellNode(this.headerContentNode,a)},styleRow:function(a,b){var f=void 0==b.style.cssText?b.getAttribute("style"):b.style.cssText;b._style=f;this.styleRowNode(a,b)},styleRowNode:function(a,b){b&&this.doStyleRowNode(a,b)},doStyleRowNode:function(a,
b){this.grid.styleRowNode(a,b)},updateRow:function(a){var b=this.getRowNode(a);b&&(b.style.height="",this.buildRow(a,b));return b},updateRowStyles:function(a){this.styleRowNode(a,this.getRowNode(a))},lastTop:0,firstScroll:0,_nativeScroll:!1,doscroll:function(a){if(13<=l("ff")||l("chrome"))this._nativeScroll=!0;a=this.grid.isLeftToRight();if(2>this.firstScroll){if(!a&&1==this.firstScroll||a&&0===this.firstScroll){var b=e.marginBox(this.headerNodeContainer);l("ie")?this.headerNodeContainer.style.width=
b.w+this.getScrollbarWidth()+"px":l("mozilla")&&(this.headerNodeContainer.style.width=b.w-this.getScrollbarWidth()+"px",this.scrollboxNode.scrollLeft=a?this.scrollboxNode.clientWidth-this.scrollboxNode.scrollWidth:this.scrollboxNode.scrollWidth-this.scrollboxNode.clientWidth)}this.firstScroll++}this.headerNode.scrollLeft=this.scrollboxNode.scrollLeft;a=this.scrollboxNode.scrollTop;a!==this.lastTop&&this.grid.scrollTo(a);this._nativeScroll=!1},setScrollTop:function(a){this.lastTop=a;this._nativeScroll||
(this.scrollboxNode.scrollTop=a);return this.scrollboxNode.scrollTop},doContentEvent:function(a){if(this.content.decorateEvent(a))this.grid.onContentEvent(a)},doHeaderEvent:function(a){if(this.header.decorateEvent(a))this.grid.onHeaderEvent(a)},dispatchContentEvent:function(a){return this.content.dispatchEvent(a)},dispatchHeaderEvent:function(a){return this.header.dispatchEvent(a)},setColWidth:function(a,b){this.grid.setCellWidth(a,b+"px")},update:function(){if(this.domNode){this.content.update();
this.grid.update();var a=this.scrollboxNode.scrollLeft;this.scrollboxNode.scrollLeft=a;this.headerNode.scrollLeft=a}}});var H=z("dojox.grid._GridAvatar",G,{construct:function(){var a=v.doc,b=a.createElement("table");b.cellPadding=b.cellSpacing="0";b.className="dojoxGridDndAvatar";b.style.position="absolute";b.style.zIndex=1999;b.style.margin="0px";var f=a.createElement("tbody"),c=a.createElement("tr"),d=a.createElement("td"),g=a.createElement("td");c.className="dojoxGridDndAvatarItem";g.className=
"dojoxGridDndAvatarItemImage";g.style.width="16px";var h=this.manager.source;if(h.creator)h=h._normalizedCreator(h.getItem(this.manager.nodes[0].id).data,"avatar").node;else if(h=this.manager.nodes[0].cloneNode(!0),"tr"==h.tagName.toLowerCase()){var k=a.createElement("table");var r=a.createElement("tbody");r.appendChild(h);k.appendChild(r);h=k}else"th"==h.tagName.toLowerCase()&&(k=a.createElement("table"),r=a.createElement("tbody"),a=a.createElement("tr"),k.cellPadding=k.cellSpacing="0",a.appendChild(h),
r.appendChild(a),k.appendChild(r),h=k);h.id="";d.appendChild(h);c.appendChild(g);c.appendChild(d);e.style(c,"opacity",.9);f.appendChild(c);b.appendChild(f);this.node=b;b=m.manager();this.oldOffsetY=b.OFFSET_Y;b.OFFSET_Y=1},destroy:function(){m.manager().OFFSET_Y=this.oldOffsetY;this.inherited(arguments)}}),I=m.manager().makeAvatar;m.manager().makeAvatar=function(){return void 0===this.source.viewIndex||e.hasClass(v.body(),"dijit_a11y")?I.call(m.manager()):new H(this)};return x});