//if($debug) Debug.write("sendAnniComplete"); this.setAttribute('visibility','visible'); this.animationInited.sendEvent(null); this.setShadow(); this.hasshadow = bool; this.initheight=this.height; ////Debug.write("this.isopen: ",this.isopen); if (!this.open) toggleopen(); if (this.onclose) this.onclose.sendEvent(); this.doDestroy(); ////Debug.write("this.isopen",this.isopen); this.setAttribute('isopen',!this.isopen); if (this.isopen){ _calcdockingList(); for (var eg in this.dockinglist){ if(this.dockinglist[eg].docking){ ////Debug.write("this.dockinglist[eg]: ",this.dockinglist[eg].title); ////Debug.write("open new y",this.y+this.initheight); this.dockinglist[eg].toggleOpenByParent(this.initheight-22); this.dockinglist[eg].setAttribute('y',this.y+this.initheight); } } this.setAttribute('height',this.initheight); } else { _calcdockingList(); for (var eg in this.dockinglist){ if(this.dockinglist[eg].docking){ ////Debug.write("this.dockinglist[eg]: ",this.dockinglist[eg].title); this.dockinglist[eg].toggleOpenByParent(-(this.initheight-22)); this.dockinglist[eg].setAttribute('y',this.y+22); } } this.setAttribute('height',22); } ////Debug.write("+++++ toggleOpenByParent +++++ changeY: ",this.title,changeY); var tempList=new Array(); -1 ) && ( (this.x+this.width) > this.parent.subviews[eg].x ) && ( this.x < (this.parent.subviews[eg].x+this.parent.subviews[eg].width) ) ){ proof=true; } if (proof) tempList.push(this.parent.subviews[eg]); } } ]]> ////Debug.write("tempList.length: ",tempList.length); if (tempList.length!=0){ for (var eg in tempList){ if(tempList[eg].docking){ ////Debug.write("toggleOpenByParent 1 [eg],changeY: ",tempList[eg].title,changeY); tempList[eg].toggleOpenByParent(changeY); tempList[eg].setAttribute('y',tempList[eg].y+changeY); } } } if (!this.allowDragging) { return; } //It's important to remove the dragger and do docking stuff before you check for connected Boxes dragger.remove(); if (obj==this){ if (docking) arrangePosition(); } else { if (docking) _lookforParentOnly(obj); } //check for connected Boxes for (var eg in this.dockinglist){ if(this.dockinglist[eg].docking){ this.dockinglist[eg]._removeDragState(this); } } this.bringToFront(); if (!this.allowDragging) { return; } _calcdockingList(); for (var eg in this.dockinglist){ if(this.dockinglist[eg].docking){ this.dockinglist[eg]._startDragState(this); } } //store position cause it wasn't dragged by itself if (obj!=this){ storeAdjustmentToParent(obj.x,obj.y); } dragger.apply(); //Clear list of conencted Boxes this.dockinglist=new Array(); -1 ) && ( (this.x+this.width) > this.parent.subviews[eg].x ) && ( this.x < (this.parent.subviews[eg].x+this.parent.subviews[eg].width) ) ){ proof=true; } if (proof) this.dockinglist.push(this.parent.subviews[eg]); } } ]]> ////Debug.write("this.dockinglist.length:",this.dockinglist.length); //do the magic //the idea is: look for all on the view container one level above this one //and look for the width/height and 0/0 and look for "dockable" stuff there var newx=this.x; var newy=this.y; -this.dockingbarrier ) && ( (this.y+this.height) > this.parent.subviews[eg].y ) && ( this.y < (this.parent.subviews[eg].y+this.parent.subviews[eg].height) ) ){ newx= ( this.parent.subviews[eg].x - this.width ); } //right box-border if ( ( ((this.parent.subviews[eg].x+this.parent.subviews[eg].width)-this.x)-this.dockingbarrier ) && ( (this.y+this.height) > this.parent.subviews[eg].y ) && ( this.y < (this.parent.subviews[eg].y+this.parent.subviews[eg].height) ) ){ newx= ( this.parent.subviews[eg].x + this.parent.subviews[eg].width ); } //top box-border if ( ( ((this.y+this.height)-this.parent.subviews[eg].y) < this.dockingbarrier ) && ( ((this.y+this.height)-this.parent.subviews[eg].y) > -this.dockingbarrier ) && ( (this.x+this.width) > this.parent.subviews[eg].x ) && ( this.x < (this.parent.subviews[eg].x+this.parent.subviews[eg].width) ) ){ newy = this.parent.subviews[eg].y-this.height; } //bottom box-border if ( ( ((this.parent.subviews[eg].y+this.parent.subviews[eg].height)-this.y) < this.dockingbarrier ) && ( ((this.parent.subviews[eg].y+this.parent.subviews[eg].height)-this.y) > -this.dockingbarrier ) && ( (this.x+this.width) > this.parent.subviews[eg].x ) && ( this.x < (this.parent.subviews[eg].x+this.parent.subviews[eg].width) ) ){ newy = this.parent.subviews[eg].y+this.parent.subviews[eg].height; } } } //Check for Borders //should be done _after_ checking for other dockable stuff so it gets //priority to dock against the border of parent view if (this.x this.tempXdistance=objX-this.x; this.tempYdistance=objY-this.y; this.destroy(); this.parent.parent.close(); ////Debug.write("onaddsubview",v); if (v.parent.subviews.length>2) this._resizeview.bringToFront(); //if ($debug) Debug.write("setTint"); //TODO: Fix this, does not work at the moment //http://code.google.com/p/openmeetings/issues/detail?id=470 this.setColor(canvas.getThemeColor('baseMousecolorizer'));