//>>built define("dojox/grid/enhanced/plugins/Exporter",["dojo/_base/declare","dojo/_base/array","dojo/_base/lang","../_Plugin","../../_RowSelector","../../EnhancedGrid","../../cells/_base"],function(_1,_2,_3,_4,_5,_6){ var _7=_3.getObject("dojox.grid.cells"); var _8=_1("dojox.grid.enhanced.plugins.Exporter",_4,{name:"exporter",constructor:function(_9,_a){ this.grid=_9; this.formatter=(_a&&_3.isObject(_a))&&_a.exportFormatter; this._mixinGrid(); },_mixinGrid:function(){ var g=this.grid; g.exportTo=_3.hitch(this,this.exportTo); g.exportGrid=_3.hitch(this,this.exportGrid); g.exportSelected=_3.hitch(this,this.exportSelected); g.setExportFormatter=_3.hitch(this,this.setExportFormatter); },setExportFormatter:function(_b){ this.formatter=_b; },exportGrid:function(_c,_d,_e){ if(_3.isFunction(_d)){ _e=_d; _d={}; } if(!_3.isString(_c)||!_3.isFunction(_e)){ return; } _d=_d||{}; var g=this.grid,_f=this,_10=this._getExportWriter(_c,_d.writerArgs),_11=(_d.fetchArgs&&_3.isObject(_d.fetchArgs))?_d.fetchArgs:{},_12=_11.onComplete; if(g.store){ _11.onComplete=function(_13,_14){ if(_12){ _12(_13,_14); } _e(_f._goThroughGridData(_13,_10)); }; _11.sort=_11.sort||g.getSortProps(); g._storeLayerFetch(_11); }else{ var _15=_11.start||0,_16=_11.count||-1,_17=[]; for(var i=_15;i!=_15+_16&&i