/*
	Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


window[esri._dojoScopeName||"dojo"]._xdResourceLoaded(function(_1,_2,_3){return {depends:[["provide","dojox.grid.EnhancedGrid"],["require","dojox.grid.DataGrid"],["require","dojox.grid.enhanced._PluginManager"],["requireLocalization","dojox.grid.enhanced","EnhancedGrid",null,"ROOT,ar,ca,cs,da,de,el,es,fi,fr,he,hr,hu,it,ja,kk,ko,nb,nl,pl,pt,pt-pt,ro,ru,sk,sl,sv,th,tr,zh,zh-tw","ROOT,ar,ca,cs,da,de,el,es,fi,fr,he,hr,hu,it,ja,kk,ko,nb,nl,pl,pt,pt-pt,ro,ru,sk,sl,sv,th,tr,zh,zh-tw"],["provide","dojox.grid.enhanced.DataSelection"],["require","dojox.grid.enhanced.plugins._SelectionPreserver"]],defineResource:function(_4,_5,_6){if(!_4._hasResource["dojox.grid.EnhancedGrid"]){_4._hasResource["dojox.grid.EnhancedGrid"]=true;_4.provide("dojox.grid.EnhancedGrid");_4.require("dojox.grid.DataGrid");_4.require("dojox.grid.enhanced._PluginManager");_4.experimental("dojox.grid.EnhancedGrid");_4.declare("dojox.grid.EnhancedGrid",_6.grid.DataGrid,{plugins:null,pluginMgr:null,keepSelection:false,_pluginMgrClass:_6.grid.enhanced._PluginManager,postMixInProperties:function(){this._nls=_4.i18n.getLocalization("dojox.grid.enhanced","EnhancedGrid",this.lang);this.inherited(arguments);},postCreate:function(){this.pluginMgr=new this._pluginMgrClass(this);this.pluginMgr.preInit();this.inherited(arguments);this.pluginMgr.postInit();},plugin:function(_7){return this.pluginMgr.getPlugin(_7);},startup:function(){this.inherited(arguments);this.pluginMgr.startup();},createSelection:function(){this.selection=new _6.grid.enhanced.DataSelection(this);},canSort:function(_8,_9){return true;},doKeyEvent:function(e){try{var _a=this.focus.focusView;_a.content.decorateEvent(e);if(!e.cell){_a.header.decorateEvent(e);}}catch(e){}this.inherited(arguments);},doApplyCellEdit:function(_b,_c,_d){if(!_d){this.invalidated[_c]=true;return;}this.inherited(arguments);},mixin:function(_e,_f){var _10={};for(var p in _f){if(p=="_inherited"||p=="declaredClass"||p=="constructor"||_f["privates"]&&_f["privates"][p]){continue;}_10[p]=_f[p];}_4.mixin(_e,_10);},_copyAttr:function(idx,_11){if(!_11){return;}return this.inherited(arguments);},_getHeaderHeight:function(){this.inherited(arguments);return _4.marginBox(this.viewsHeaderNode).h;},_fetch:function(_12,_13){if(this.items){return this.inherited(arguments);}_12=_12||0;if(this.store&&!this._pending_requests[_12]){if(!this._isLoaded&&!this._isLoading){this._isLoading=true;this.showMessage(this.loadingMessage);}this._pending_requests[_12]=true;try{var req={start:_12,count:this.rowsPerPage,query:this.query,sort:this.getSortProps(),queryOptions:this.queryOptions,isRender:_13,onBegin:_4.hitch(this,"_onFetchBegin"),onComplete:_4.hitch(this,"_onFetchComplete"),onError:_4.hitch(this,"_onFetchError")};this._storeLayerFetch(req);}catch(e){this._onFetchError(e,{start:_12,count:this.rowsPerPage});}}return 0;},_storeLayerFetch:function(req){this.store.fetch(req);},getCellByField:function(_14){return _4.filter(this.layout.cells,function(_15){return _15.field==_14;})[0];},onMouseUp:function(e){},createView:function(){var _16=this.inherited(arguments);if(_4.isMoz){var _17=function(_18,_19){for(var n=_18;n&&_19(n);n=n.parentNode){}return n;};var _1a=function(_1b){var _1c=_1b.toUpperCase();return function(_1d){return _1d.tagName!=_1c;};};var _1e=_16.header.getCellX;_16.header.getCellX=function(e){var x=_1e.call(_16.header,e);var n=_17(e.target,_1a("th"));if(n&&n!==e.target&&_4.isDescendant(e.target,n)){x+=n.firstChild.offsetLeft;}return x;};}return _16;},destroy:function(){delete this._nls;this.selection.destroy();this.pluginMgr.destroy();this.inherited(arguments);}});_4.provide("dojox.grid.enhanced.DataSelection");_4.require("dojox.grid.enhanced.plugins._SelectionPreserver");_4.declare("dojox.grid.enhanced.DataSelection",_6.grid.DataSelection,{constructor:function(_1f){if(_1f.keepSelection){this.preserver=new _6.grid.enhanced.plugins._SelectionPreserver(this);}},_range:function(_20,_21){this.grid._selectingRange=true;this.inherited(arguments);this.grid._selectingRange=false;this.onChanged();},deselectAll:function(_22){this.grid._selectingRange=true;this.inherited(arguments);this.grid._selectingRange=false;this.onChanged();},destroy:function(){if(this.preserver){this.preserver.destroy();}}});_6.grid.EnhancedGrid.markupFactory=function(_23,_24,_25,_26){return _6.grid._Grid.markupFactory(_23,_24,_25,_4.partial(_6.grid.DataGrid.cell_markupFactory,_26));};_6.grid.EnhancedGrid.registerPlugin=function(_27,_28){_6.grid.enhanced._PluginManager.registerPlugin(_27,_28);};}}};});