//>>built define("dojox/grid/Selection",["dojo/_base/declare","dojo/_base/array","dojo/_base/lang","dojo/dom-attr"],function(_1,_2,_3,_4){ return _1("dojox.grid.Selection",null,{constructor:function(_5){ this.grid=_5; this.selected=[]; this.setMode(_5.selectionMode); },mode:"extended",selected:null,updating:0,selectedIndex:-1,rangeStartIndex:-1,setMode:function(_6){ if(this.selected.length){ this.deselectAll(); } if(_6!="extended"&&_6!="multiple"&&_6!="single"&&_6!="none"){ this.mode="extended"; }else{ this.mode=_6; } },onCanSelect:function(_7){ return this.grid.onCanSelect(_7); },onCanDeselect:function(_8){ return this.grid.onCanDeselect(_8); },onSelected:function(_9){ },onDeselected:function(_a){ },onChanging:function(){ },onChanged:function(){ },isSelected:function(_b){ if(this.mode=="none"){ return false; } return this.selected[_b]; },getFirstSelected:function(){ if(!this.selected.length||this.mode=="none"){ return -1; } for(var i=0,l=this.selected.length;i=0?_16:_17),e=_17; if(s>e){ e=s; s=_17; } for(var i=s;i<=e;i++){ _18(i); } },selectRange:function(_19,_1a){ this._range(_19,_1a,_3.hitch(this,"addToSelection")); },deselectRange:function(_1b,_1c){ this._range(_1b,_1c,_3.hitch(this,"deselect")); },insert:function(_1d){ this.selected.splice(_1d,0,false); if(this.selectedIndex>=_1d){ this.selectedIndex++; } },remove:function(_1e){ this.selected.splice(_1e,1); if(this.selectedIndex>=_1e){ this.selectedIndex--; } },deselectAll:function(_1f){ for(var i in this.selected){ if((i!=_1f)&&(this.selected[i]===true)){ this.deselect(i); } } },clickSelect:function(_20,_21,_22){ if(this.mode=="none"){ return; } this._beginUpdate(); if(this.mode!="extended"){ this.select(_20); }else{ if(!_22||this.rangeStartIndex<0){ this.rangeStartIndex=_20; } if(!_21){ this.deselectAll(_20); } if(_22){ this.selectRange(this.rangeStartIndex,_20); }else{ if(_21){ this.toggleSelect(_20); }else{ this.addToSelection(_20); } } } this._endUpdate(); },clickSelectEvent:function(e){ this.clickSelect(e.rowIndex,dojo.isCopyKey(e),e.shiftKey); },clear:function(){ this._beginUpdate(); this.deselectAll(); this._endUpdate(); }}); });