/*
	Copyright (c) 2004-2009, 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
*/


if(!dojo._hasResource["dojox.layout.GridContainer"]){
dojo._hasResource["dojox.layout.GridContainer"]=true;
dojo.provide("dojox.layout.GridContainer");
dojo.experimental("dojox.layout.GridContainer");
dojo.require("dijit._base.focus");
dojo.require("dijit._Templated");
dojo.require("dijit._Container");
dojo.require("dijit._Contained");
dojo.require("dojo.dnd.move");
dojo.require("dojox.layout.dnd.PlottedDnd");
dojo.requireLocalization("dojox.layout","GridContainer",null,"ROOT,en,fr");
dojo.declare("dojox.layout.GridContainer",[dijit._Widget,dijit._Templated,dijit._Container,dijit._Contained],{templateString:"<div id=\"${id}\" class=\"gridContainer\" dojoAttachPoint=\"containerNode\" tabIndex=\"0\" dojoAttachEvent=\"onkeypress:_selectFocus\">\n\t<table class=\"gridContainerTable\" dojoAttachPoint=\"gridContainerTable\" cellspacing=\"0\" cellpadding=\"0\">\n\t\t<tbody>\n\t\t\t<tr dojoAttachPoint=\"gridNode\"></tr>\n\t\t</tbody>\n\t</table>\n</div>\n",isContainer:true,i18n:null,isAutoOrganized:true,isRightFixed:false,isLeftFixed:false,hasResizableColumns:true,nbZones:1,opacity:1,minColWidth:20,minChildWidth:150,acceptTypes:[],mode:"right",allowAutoScroll:false,timeDisplayPopup:1500,isOffset:false,offsetDrag:{},withHandles:false,handleClasses:[],_draggedWidget:null,_isResized:false,_activeGrip:null,_oldwidth:0,_oldheight:0,_a11yOn:false,_canDisplayPopup:true,constructor:function(_1,_2){
this.acceptTypes=_1["acceptTypes"]||["dijit.layout.ContentPane"];
this.dragOffset=_1["dragOffset"]||{x:0,y:0};
},postMixInProperties:function(){
this.i18n=dojo.i18n.getLocalization("dojox.layout","GridContainer");
},_createCells:function(){
if(this.nbZones===0){
this.nbZones=1;
}
var _3=100/this.nbZones;
if(dojo.isIE&&dojo.marginBox(this.gridNode).height){
var _4=document.createTextNode(" ");
this.gridNode.appendChild(_4);
}
var _5=[];
this.cell=[];
var i=0;
while(i<this.nbZones){
var _7=dojo.doc.createElement("td");
dojo.addClass(_7,"gridContainerZone");
_7.id=this.id+"_dz"+i;
_7.style.width=_3+"%";
var _8=this.gridNode.appendChild(_7);
this.cell[i]=_8;
i++;
}
},startup:function(){
this._createCells();
if(this.usepref!==true){
this[(this.isAutoOrganized?"_organizeServices":"_organizeServicesManually")]();
}else{
return;
}
this.init();
},init:function(){
this.grid=this._createGrid();
this.connect(dojo.global,"onresize","onResized");
this.connect(this,"onDndDrop","_placeGrips");
this.dropHandler=dojo.subscribe("/dnd/drop",this,"_placeGrips");
this._oldwidth=this.domNode.offsetWidth;
if(this.hasResizableColumns){
this._initPlaceGrips();
this._placeGrips();
}
},destroy:function(){
for(var i=0;i<this.handleDndStart;i++){
dojo.disconnect(this.handleDndStart[i]);
}
dojo.unsubscribe(this.dropHandler);
this.inherited(arguments);
},onResized:function(){
if(this.hasResizableColumns){
this._placeGrips();
this._oldwidth=this.domNode.offsetWidth;
this._oldheight=this.domNode.offsetHeight;
}
},_organizeServices:function(){
var _a=this.nbZones;
var _b=this.getChildren().length;
var _c=Math.floor(_b/_a);
var _d=_b%_a;
var i=0;
for(var z=0;z<_a;z++){
for(var r=0;r<_c;r++){
this._insertService(z,i++,0,true);
}
if(_d>0){
try{
this._insertService(z,i++,0,true);
}
catch(e){
console.error("Unable to insert service in grid container",e,this.getChildren());
}
_d--;
}else{
if(_c===0){
break;
}
}
}
},_organizeServicesManually:function(){
var _11=this.getChildren();
for(var i=0;i<_11.length;i++){
try{
this._insertService(_11[i].column-1,i,0,true);
}
catch(e){
console.error("Unable to insert service in grid container",e,_11[i]);
}
}
},_insertService:function(z,p,i,_16){
var _17=this.cell[z];
var _18=_17.childNodes.length;
var _19=this.getChildren()[(i?i:0)];
if(typeof (p)=="undefined"||p>_18){
p=_18;
}
var _1a=dojo.place(_19.domNode,_17,p);
_19.domNode.setAttribute("tabIndex",0);
if(!_19.dragRestriction){
dojo.addClass(_19.domNode,"dojoDndItem");
}
if(!_19.domNode.getAttribute("dndType")){
_19.domNode.setAttribute("dndType",_19.declaredClass);
}
dojox.layout.dnd._setGcDndHandle(_19,this.withHandles,this.handleClasses,_16);
if(this.hasResizableColumns){
if(_19.onLoad){
this.connect(_19,"onLoad","_placeGrips");
}
if(_19.onExecError){
this.connect(_19,"onExecError","_placeGrips");
}
if(_19.onUnLoad){
this.connect(_19,"onUnLoad","_placeGrips");
}
}
this._placeGrips();
return _19.id;
},addService:function(_1b,z,p){
_1b.domNode.id=_1b.id;
this.addChild(_1b);
if(p<=0){
p=0;
}
var _1e=this._insertService(z,p);
this.grid[z].setItem(_1b.id,{data:_1b.domNode,type:[_1b.domNode.getAttribute("dndType")]});
return _1e;
},_createGrid:function(){
var _1f=[];
var i=0;
this.tabDZ=[];
while(i<this.nbZones){
var _21=this.cell[i];
this.tabDZ[i]=this._createZone(_21);
if(this.hasResizableColumns&&i!=(this.nbZones-1)){
this._createGrip(this.tabDZ[i]);
}
_1f.push(this.tabDZ[i]);
i++;
}
if(this.hasResizableColumns){
this.handleDndStart=[];
for(var j=0;j<this.tabDZ.length;j++){
var dz=this.tabDZ[j];
var _24=this;
this.handleDndStart.push(dojo.connect(dz,"onDndStart",dz,function(_25){
if(_25==this){
_24.handleDndInsertNodes=[];
for(i=0;i<_24.tabDZ.length;i++){
_24.handleDndInsertNodes.push(dojo.connect(_24.tabDZ[i],"insertNodes",_24,function(){
_24._disconnectDnd();
}));
}
_24.handleDndInsertNodes.push(dojo.connect(dz,"onDndCancel",_24,_24._disconnectDnd));
_24.onResized();
}
}));
}
}
return _1f;
},_disconnectDnd:function(){
dojo.forEach(this.handleDndInsertNodes,dojo.disconnect);
setTimeout(dojo.hitch(this,"onResized"),0);
},_createZone:function(_26){
var dz=null;
dz=new dojox.layout.dnd.PlottedDnd(_26.id,{accept:this.acceptTypes,withHandles:this.withHandles,handleClasses:this.handleClasses,singular:true,hideSource:true,opacity:this.opacity,dom:this.domNode,allowAutoScroll:this.allowAutoScroll,isOffset:this.isOffset,offsetDrag:this.offsetDrag});
this.connect(dz,"insertDashedZone","_placeGrips");
this.connect(dz,"deleteDashedZone","_placeGrips");
return dz;
},_createGrip:function(dz){
var _29=document.createElement("div");
_29.className="gridContainerGrip";
_29.setAttribute("tabIndex","0");
var _2a=this;
this.onMouseOver=this.connect(_29,"onmouseover",function(e){
var _2c=false;
for(var i=0;i<_2a.grid.length-1;i++){
if(dojo.hasClass(_2a.grid[i].grip,"gridContainerGripShow")){
_2c=true;
break;
}
}
if(!_2c){
dojo.removeClass(e.target,"gridContainerGrip");
dojo.addClass(e.target,"gridContainerGripShow");
}
});
this.connect(_29,"onmouseout",function(e){
if(!_2a._isResized){
dojo.removeClass(e.target,"gridContainerGripShow");
dojo.addClass(e.target,"gridContainerGrip");
}
});
this.connect(_29,"onmousedown",function(e){
_2a._a11yOn=false;
_2a._activeGrip=e.target;
_2a.resizeColumnOn(e);
});
this.domNode.appendChild(_29);
dz.grip=_29;
},_initPlaceGrips:function(){
var dcs=dojo.getComputedStyle(this.domNode);
var gcs=dojo.getComputedStyle(this.gridContainerTable);
this._x=parseInt(dcs.paddingLeft);
this._topGrip=parseInt(dcs.paddingTop);
if(dojo.isIE||gcs.borderCollapse!="collapse"){
var ex=dojo._getBorderExtents(this.gridContainerTable);
this._x+=ex.l;
this._topGrip+=ex.t;
}
this._topGrip+="px";
dojo.forEach(this.grid,function(_33){
if(_33.grip){
var _34=_33.grip;
if(!dojo.isIE){
_33.pad=dojo._getPadBorderExtents(_33.node).w;
}
_34.style.top=this._topGrip;
}
},this);
},_placeGrips:function(){
var _35;
if(this.allowAutoScroll){
_35=this.gridNode.scrollHeight;
}else{
_35=dojo.contentBox(this.gridNode).h;
}
var _36=this._x;
dojo.forEach(this.grid,function(_37){
if(_37.grip){
var _38=_37.grip;
_36+=dojo[(dojo.isIE?"marginBox":"contentBox")](_37.node).w+(dojo.isIE?0:_37.pad);
dojo.style(_38,{left:_36+"px",height:_35+"px"});
}
},this);
},_getZoneByIndex:function(n){
return this.grid[(n>=0&&n<this.grid.length?n:0)];
},getIndexZone:function(_3a){
for(var z=0;z<this.grid.length;z++){
if(this.grid[z].domNode==_3a){
return z;
}
}
return -1;
},resizeColumnOn:function(e){
var k=dojo.keys;
if(this._a11yOn&&e.keyCode!=k.LEFT_ARROW&&e.keyCode!=k.RIGHT_ARROW){
return;
}
e.preventDefault();
dojo.body().style.cursor="ew-resize";
this._isResized=true;
this.initX=e.pageX;
var _3e=[];
for(var i=0;i<this.grid.length;i++){
_3e[i]=dojo.contentBox(this.grid[i].node).w;
}
this.oldTabSize=_3e;
for(var i=0;i<this.grid.length;i++){
if(this._activeGrip==this.grid[i].grip){
this.currentColumn=this.grid[i].node;
this.currentColumnWidth=_3e[i];
this.nextColumn=this.currentColumn.nextSibling;
this.nextColumnWidth=_3e[i+1];
}
this.grid[i].node.style.width=_3e[i]+"px";
}
var _40=function(_41,_42){
var _43=0;
var _44=0;
dojo.forEach(_41,function(_45){
if(_45.nodeType==1){
var _46=dojo.getComputedStyle(_45);
var _47=(dojo.isIE?_42:parseInt(_46.minWidth));
_44=_47+parseInt(_46.marginLeft)+parseInt(_46.marginRight);
if(_43<_44){
_43=_44;
}
}
});
return _43;
};
var _48=_40(this.currentColumn.childNodes,this.minChildWidth);
var _49=_40(this.nextColumn.childNodes,this.minChildWidth);
var _4a=Math.round((dojo.marginBox(this.gridContainerTable).w*this.minColWidth)/100);
this.currentMinCol=_48;
this.nextMinCol=_49;
if(_4a>this.currentMinCol){
this.currentMinCol=_4a;
}
if(_4a>this.nextMinCol){
this.nextMinCol=_4a;
}
if(this._a11yOn){
this.connectResizeColumnMove=this.connect(dojo.doc,"onkeypress","resizeColumnMove");
}else{
this.connectResizeColumnMove=this.connect(dojo.doc,"onmousemove","resizeColumnMove");
this.connectResizeColumnOff=this.connect(document,"onmouseup","resizeColumnOff");
}
},resizeColumnMove:function(e){
var d=0;
if(this._a11yOn){
var k=dojo.keys;
switch(e.keyCode){
case k.LEFT_ARROW:
d=-10;
break;
case k.RIGHT_ARROW:
d=10;
break;
}
}else{
e.preventDefault();
d=e.pageX-this.initX;
}
if(d==0){
return;
}
if(!(this.currentColumnWidth+d<this.currentMinCol||this.nextColumnWidth-d<this.nextMinCol)){
this.currentColumnWidth+=d;
this.nextColumnWidth-=d;
this.initX=e.pageX;
this.currentColumn.style["width"]=this.currentColumnWidth+"px";
this.nextColumn.style["width"]=this.nextColumnWidth+"px";
this._activeGrip.style.left=parseInt(this._activeGrip.style.left)+d+"px";
this._placeGrips();
}
if(this._a11yOn){
this.resizeColumnOff(e);
}
},resizeColumnOff:function(e){
dojo.body().style.cursor="default";
if(this._a11yOn){
this.disconnect(this.connectResizeColumnMove);
this._a11yOn=false;
}else{
this.disconnect(this.connectResizeColumnMove);
this.disconnect(this.connectResizeColumnOff);
}
var _4f=[];
var _50=[];
var _51=this.gridContainerTable.clientWidth;
for(var i=0;i<this.grid.length;i++){
var _cb=dojo.contentBox(this.grid[i].node);
if(dojo.isIE){
_4f[i]=dojo.marginBox(this.grid[i].node).w;
_50[i]=_cb.w;
}else{
_4f[i]=_cb.w;
_50=_4f;
}
}
var _54=false;
for(var i=0;i<_50.length;i++){
if(_50[i]!=this.oldTabSize[i]){
_54=true;
break;
}
}
if(_54){
var mul=dojo.isIE?100:10000;
for(var i=0;i<this.grid.length;i++){
this.grid[i].node.style.width=Math.round((100*mul*_4f[i])/_51)/mul+"%";
}
this._placeGrips();
}
if(this._activeGrip){
dojo.removeClass(this._activeGrip,"gridContainerGripShow");
dojo.addClass(this._activeGrip,"gridContainerGrip");
}
this._isResized=false;
},setColumns:function(_56){
if(_56>0){
var _57=this.grid.length-_56;
if(_57>0){
var _58=[];
var _59,_5a,end;
if(this.mode=="right"){
end=(this.isLeftFixed&&this.grid.length>0)?1:0;
_5a=this.grid.length-(this.isRightFixed?2:1);
for(var z=_5a;z>=end;z--){
var _5d=0;
var _59=this.grid[z].node;
for(var j=0;j<_59.childNodes.length;j++){
if(_59.childNodes[j].nodeType==1&&!(_59.childNodes[j].id=="")){
_5d++;
break;
}
}
if(_5d==0){
_58[_58.length]=z;
}
if(_58.length>=_57){
this._deleteColumn(_58);
break;
}
}
if(_58.length<_57){
console.error(this.i18n.err_onSetNbColsRightMode);
}
}else{
if(this.isLeftFixed&&this.grid.length>0){
_5a=1;
}else{
_5a=0;
}
if(this.isRightFixed){
end=this.grid.length-1;
}else{
end=this.grid.length;
}
for(var z=_5a;z<end;z++){
var _5d=0;
var _59=this.grid[z].node;
for(var j=0;j<_59.childNodes.length;j++){
if(_59.childNodes[j].nodeType==1&&!(_59.childNodes[j].id=="")){
_5d++;
break;
}
}
if(_5d==0){
_58[_58.length]=z;
}
if(_58.length>=_57){
this._deleteColumn(_58);
break;
}
}
if(_58.length<_57){
alert(this.i18n.err_onSetNbColsLeftMode);
}
}
}else{
if(_57<0){
this._addColumn(Math.abs(_57));
}
}
this._initPlaceGrips();
this._placeGrips();
}
},_addColumn:function(_5f){
var _60;
if(this.hasResizableColumns&&!this.isRightFixed&&this.mode=="right"){
_60=this.grid[this.grid.length-1];
this._createGrip(_60);
}
for(var i=0;i<_5f;i++){
_60=dojo.doc.createElement("td");
dojo.addClass(_60,"gridContainerZone");
_60.id=this.id+"_dz"+this.nbZones;
var dz;
if(this.mode=="right"){
if(this.isRightFixed){
this.grid[this.grid.length-1].node.parentNode.insertBefore(_60,this.grid[this.grid.length-1].node);
dz=this._createZone(_60);
this.tabDZ.splice(this.tabDZ.length-1,0,dz);
this.grid.splice(this.grid.length-1,0,dz);
this.cell.splice(this.cell.length-1,0,_60);
}else{
var _63=this.gridNode.appendChild(_60);
dz=this._createZone(_60);
this.tabDZ.push(dz);
this.grid.push(dz);
this.cell.push(_60);
}
}else{
if(this.isLeftFixed){
(this.grid.length==1)?this.grid[0].node.parentNode.appendChild(_60,this.grid[0].node):this.grid[1].node.parentNode.insertBefore(_60,this.grid[1].node);
dz=this._createZone(_60);
this.tabDZ.splice(1,0,dz);
this.grid.splice(1,0,dz);
this.cell.splice(1,0,_60);
}else{
this.grid[this.grid.length-this.nbZones].node.parentNode.insertBefore(_60,this.grid[this.grid.length-this.nbZones].node);
dz=this._createZone(_60);
this.tabDZ.splice(this.tabDZ.length-this.nbZones,0,dz);
this.grid.splice(this.grid.length-this.nbZones,0,dz);
this.cell.splice(this.cell.length-this.nbZones,0,_60);
}
}
if(this.hasResizableColumns){
var _64=this;
var _65=dojo.connect(dz,"onDndStart",dz,function(_66){
if(_66==this){
_64.handleDndInsertNodes=[];
for(var o=0;o<_64.tabDZ.length;o++){
_64.handleDndInsertNodes.push(dojo.connect(_64.tabDZ[o],"insertNodes",_64,function(){
_64._disconnectDnd();
}));
}
_64.handleDndInsertNodes.push(dojo.connect(dz,"onDndCancel",_64,_64._disconnectDnd));
_64.onResized();
}
});
if(this.mode=="right"){
if(this.isRightFixed){
this.handleDndStart.splice(this.handleDndStart.length-1,0,_65);
}else{
this.handleDndStart.push(_65);
}
}else{
if(this.isLeftFixed){
this.handleDndStart.splice(1,0,_65);
}else{
this.handleDndStart.splice(this.handleDndStart.length-this.nbZones,0,_65);
}
}
this._createGrip(dz);
}
this.nbZones++;
}
this._updateColumnsWidth();
},_deleteColumn:function(_68){
var _69,_6a,_6b;
_6b=0;
for(var i=0;i<_68.length;i++){
var idx=_68[i];
if(this.mode=="right"){
_69=this.grid[idx];
}else{
_69=this.grid[idx-_6b];
}
for(var j=0;j<_69.node.childNodes.length;j++){
if(_69.node.childNodes[j].nodeType!=1){
continue;
}
_6a=dijit.byId(_69.node.childNodes[j].id);
for(var x=0;x<this.getChildren().length;x++){
if(this.getChildren()[x]===_6a){
this.getChildren().splice(x,1);
break;
}
}
}
_69.node.parentNode.removeChild(_69.node);
if(this.mode=="right"){
if(this.hasResizableColumns){
dojo.disconnect(this.handleDndStart[idx]);
}
this.grid.splice(idx,1);
this.tabDZ.splice(idx,1);
this.cell.splice(idx,1);
}else{
if(this.hasResizableColumns){
dojo.disconnect(this.handleDndStart[idx-_6b]);
}
this.grid.splice(idx-_6b,1);
this.tabDZ.splice(idx-_6b,1);
this.cell.splice(idx-_6b,1);
}
this.nbZones--;
_6b++;
if(_69.grip){
this.domNode.removeChild(_69.grip);
}
}
this._updateColumnsWidth();
},_updateColumnsWidth:function(){
var _70=100/this.nbZones;
var _71;
for(var z=0;z<this.grid.length;z++){
_71=this.grid[z].node;
_71.style.width=_70+"%";
}
},_selectFocus:function(_73){
var e=_73.keyCode;
var _75=null;
var _76=dijit.getFocus();
var _77=_76.node;
var k=dojo.keys;
var _79=(e==k.UP_ARROW||e==k.LEFT_ARROW)?"lastChild":"firstChild";
var pos=(e==k.UP_ARROW||e==k.LEFT_ARROW)?"previousSibling":"nextSibling";
if(_77==this.containerNode){
switch(e){
case k.DOWN_ARROW:
case k.RIGHT_ARROW:
for(var i=0;i<this.gridNode.childNodes.length;i++){
_75=this.gridNode.childNodes[i].firstChild;
var _7c=false;
while(!_7c){
if(_75!=null){
if(_75.style.display!=="none"){
dijit.focus(_75);
dojo.stopEvent(_73);
_7c=true;
}else{
_75=_75[pos];
}
}else{
break;
}
}
if(_7c){
break;
}
}
break;
case k.UP_ARROW:
case k.LEFT_ARROW:
for(var i=this.gridNode.childNodes.length-1;i>=0;i--){
_75=this.gridNode.childNodes[i].lastChild;
var _7c=false;
while(!_7c){
if(_75!=null){
if(_75.style.display!=="none"){
dijit.focus(_75);
dojo.stopEvent(_73);
_7c=true;
}else{
_75=_75[pos];
}
}else{
break;
}
}
if(_7c){
break;
}
}
break;
}
}else{
if(_77.parentNode.parentNode==this.gridNode){
switch(e){
case k.UP_ARROW:
case k.DOWN_ARROW:
dojo.stopEvent(_73);
var _7d=0;
dojo.forEach(_77.parentNode.childNodes,function(_7e){
if(_7e.style.display!=="none"){
_7d++;
}
});
if(_7d==1){
return;
}
var _7c=false;
_75=_77[pos];
while(!_7c){
if(_75==null){
_75=_77.parentNode[_79];
if(_75.style.display!=="none"){
_7c=true;
}else{
_75=_75[pos];
}
}else{
if(_75.style.display!=="none"){
_7c=true;
}else{
_75=_75[pos];
}
}
}
if(_73.shiftKey){
if(dijit.byNode(_77).dragRestriction){
return;
}
var _7f=_77.getAttribute("dndtype");
var _80=false;
for(var i=0;i<this.acceptTypes.length;i++){
if(_7f==this.acceptTypes[i]){
var _80=true;
break;
}
}
if(_80){
var _81=_77.parentNode;
var _82=_81.firstChild;
var _83=_81.lastChild;
while(_82.style.display=="none"||_83.style.display=="none"){
if(_82.style.display=="none"){
_82=_82.nextSibling;
}
if(_83.style.display=="none"){
_83=_83.previousSibling;
}
}
if(e==k.UP_ARROW){
var r=_81.removeChild(_77);
if(r==_82){
_81.appendChild(r);
}else{
_81.insertBefore(r,_75);
}
r.setAttribute("tabIndex","0");
dijit.focus(r);
}else{
if(_77==_83){
var r=_81.removeChild(_77);
_81.insertBefore(r,_75);
r.setAttribute("tabIndex","0");
dijit.focus(r);
}else{
var r=_81.removeChild(_75);
_81.insertBefore(r,_77);
_77.setAttribute("tabIndex","0");
dijit.focus(_77);
}
}
}else{
this._displayPopup();
}
}else{
dijit.focus(_75);
}
break;
case k.RIGHT_ARROW:
case k.LEFT_ARROW:
dojo.stopEvent(_73);
if(_73.shiftKey){
if(dijit.byNode(_77).dragRestriction){
return;
}
var z=0;
if(_77.parentNode[pos]==null){
if(e==k.LEFT_ARROW){
var z=this.gridNode.childNodes.length-1;
}
}else{
if(_77.parentNode[pos].nodeType==3){
z=this.gridNode.childNodes.length-2;
}else{
for(var i=0;i<this.gridNode.childNodes.length;i++){
if(_77.parentNode[pos]==this.gridNode.childNodes[i]){
break;
}
z++;
}
}
}
var _7f=_77.getAttribute("dndtype");
var _80=false;
for(var i=0;i<this.acceptTypes.length;i++){
if(_7f==this.acceptTypes[i]){
_80=true;
break;
}
}
if(_80){
var _86=_77.parentNode;
var _87=dijit.byNode(_77);
var r=_86.removeChild(_77);
var _88=(e==k.RIGHT_ARROW?0:this.gridNode.childNodes[z].length);
this.addService(_87,z,_88);
r.setAttribute("tabIndex","0");
dijit.focus(r);
this._placeGrips();
}else{
this._displayPopup();
}
}else{
var _89=_77.parentNode;
while(_75===null){
if(_89[pos]!==null&&_89[pos].nodeType!==3){
_89=_89[pos];
}else{
if(pos==="previousSibling"){
_89=_89.parentNode.childNodes[_89.parentNode.childNodes.length-1];
}else{
_89=_89.parentNode.childNodes[0];
}
}
var _7c=false;
var _8a=_89[_79];
while(!_7c){
if(_8a!=null){
if(_8a.style.display!=="none"){
_75=_8a;
_7c=true;
}else{
_8a=_8a[pos];
}
}else{
break;
}
}
}
dijit.focus(_75);
}
break;
}
}else{
if(dojo.hasClass(_77,"gridContainerGrip")||dojo.hasClass(_77,"gridContainerGripShow")){
this._activeGrip=_73.target;
this._a11yOn=true;
this.resizeColumnOn(_73);
}
}
}
},_displayPopup:function(){
if(this._canDisplayPopup){
var _8b=dojo.doc.createElement("div");
dojo.addClass(_8b,"gridContainerPopup");
_8b.innerHTML=this.i18n.alertPopup;
var _8c=this.containerNode.appendChild(_8b);
this._canDisplayPopup=false;
setTimeout(dojo.hitch(this,function(){
this.containerNode.removeChild(_8c);
dojo.destroy(_8c);
this._canDisplayPopup=true;
}),this.timeDisplayPopup);
}
}});
dojo.extend(dijit._Widget,{dragRestriction:false,column:"1",group:""});
}
