//>>built
define("dojox/grid/EnhancedGrid","dojo/_base/kernel ../main dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/_base/sniff dojo/dom dojo/dom-geometry ./DataGrid ./DataSelection ./enhanced/_PluginManager ./enhanced/plugins/_SelectionPreserver dojo/i18n!./enhanced/nls/EnhancedGrid".split(" "),function(f,l,m,g,q,r,t,u,n,v,p,w,x){f.experimental("dojox.grid.EnhancedGrid");f=m("dojox.grid.EnhancedGrid",n,{plugins:null,pluginMgr:null,_pluginMgrClass:p,postMixInProperties:function(){this._nls=x;this.inherited(arguments)},
postCreate:function(){this.pluginMgr=new this._pluginMgrClass(this);this.pluginMgr.preInit();this.inherited(arguments);this.pluginMgr.postInit()},plugin:function(a){return this.pluginMgr.getPlugin(a)},startup:function(){this.inherited(arguments);this.pluginMgr.startup()},createSelection:function(){this.selection=new l.grid.enhanced.DataSelection(this)},canSort:function(a,b){return!0},doKeyEvent:function(a){try{var b=this.focus.focusView;b.content.decorateEvent(a);a.cell||b.header.decorateEvent(a)}catch(d){}this.inherited(arguments)},
doApplyCellEdit:function(a,b,d){d?this.inherited(arguments):this.invalidated[b]=!0},mixin:function(a,b){var d={},c;for(c in b)"_inherited"==c||"declaredClass"==c||"constructor"==c||b.privates&&b.privates[c]||(d[c]=b[c]);g.mixin(a,d)},_copyAttr:function(a,b){if(b)return this.inherited(arguments)},_getHeaderHeight:function(){this.inherited(arguments);return u.getMarginBox(this.viewsHeaderNode).h},_fetch:function(a,b){if(this.items)return this.inherited(arguments);a=a||0;if(this.store&&!this._pending_requests[a]){this._isLoaded||
this._isLoading||(this._isLoading=!0,this.showMessage(this.loadingMessage));this._pending_requests[a]=!0;try{var d={start:a,count:this.rowsPerPage,query:this.query,sort:this.getSortProps(),queryOptions:this.queryOptions,isRender:b,onBegin:g.hitch(this,"_onFetchBegin"),onComplete:g.hitch(this,"_onFetchComplete"),onError:g.hitch(this,"_onFetchError")};this._storeLayerFetch(d)}catch(c){this._onFetchError(c,{start:a,count:this.rowsPerPage})}}return 0},_storeLayerFetch:function(a){this.store.fetch(a)},
getCellByField:function(a){return q.filter(this.layout.cells,function(b){return b.field==a})[0]},onMouseUp:function(a){},createView:function(){var a=this.inherited(arguments);if(r("mozilla")){var b=function(c){var k=c.toUpperCase();return function(e){return e.tagName!=k}},d=a.header.getCellX;a.header.getCellX=function(c){var k=d.call(a.header,c);var e=b("th");for(var h=c.target;h&&e(h);h=h.parentNode);(e=h)&&e!==c.target&&t.isDescendant(c.target,e)&&(k+=e.firstChild.offsetLeft);return k}}return a},
destroy:function(){delete this._nls;this.pluginMgr.destroy();this.inherited(arguments)}});m("dojox.grid.enhanced.DataSelection",v,{constructor:function(a){a.keepSelection&&(this.preserver&&this.preserver.destroy(),this.preserver=new w(this))},_range:function(a,b){this.grid._selectingRange=!0;this.inherited(arguments);this.grid._selectingRange=!1;this.onChanged()},deselectAll:function(a){this.grid._selectingRange=!0;this.inherited(arguments);this.grid._selectingRange=!1;this.onChanged()}});f.markupFactory=
function(a,b,d,c){return l.grid._Grid.markupFactory(a,b,d,g.partial(n.cell_markupFactory,c))};f.registerPlugin=function(a,b){p.registerPlugin(a,b)};return f});