rem:  this.parent = parent; 
add: this.aboutToShow(); 
context: 	open: function(/*Integer*/x, /*Integer*/y, /*DomNode*/parent, /*Object*/explodeSrc, /*String?*/orient, /*Array?*/padding){		// summary:		//		Open the popup at position (x,y), relative to dojo.body()	 	//		Or open(node, parent, explodeSrc, aroundOrient) to open	 	//		around node		if (this.isShowingNow){ return; }		this.aboutToShow();		// if I click right button and menu is opened, then it gets 2 commands: close -> open		// so close enables animation and next "open" is put to queue to occur at new location		if(this.animationInProgress){			this.queueOnAnimationFinish.push(this.open, arguments);			return;		}		// save this so that the focus can be returned		this.parent = parent;		var around = false, node, aroundOrient;		if(typeof x == 'object'){			node = x;			aroundOrient = explodeSrc;			explodeSrc = parent;			parent = y;			around = true;		}		// for unknown reasons even if the domNode is attached to the body in postCreate(),		// it's not attached here, so have to attach it here.		dojo.body().appendChild(this.domNode);		// if explodeSrc isn't specified then explode from my parent widget		explodeSrc = explodeSrc || parent["domNode"] || [];		//keep track of parent popup to decided whether this is a top level popup		var parentPopup = null;		this.isTopLevel = true;		while(parent){			if(parent !== this && (parent.setOpenedSubpopup != undefined && parent.applyPopupBasicStyle != undefined)){				parentPopup = parent;				this.isTopLevel = false;				parentPopup.setOpenedSubpopup(this);				break;			}			parent = parent.parent;		}		this.parentPopup = parentPopup;		this.popupIndex = parentPopup ? parentPopup.popupIndex + 1 : 1;		if(this.isTopLevel){			var button = dojo.html.isNode(explodeSrc) ? explodeSrc : null;			dojo.widget.PopupManager.opened(this, button);		}		//Store the current selection and restore it before the action for a menu item		//is executed. This is required as clicking on an menu item deselects current selection		if(this.isTopLevel && !dojo.withGlobal(this.openedForWindow||dojo.global(), dojo.html.selection.isCollapsed)){			this._bookmark = dojo.withGlobal(this.openedForWindow||dojo.global(), dojo.html.selection.getBookmark);		}else{			this._bookmark = null;		}		//convert explodeSrc from format [x, y] to		//{left: x, top: y, width: 0, height: 0} which is the new		//format required by dojo.html.toCoordinateObject		if(explodeSrc instanceof Array){			explodeSrc = {left: explodeSrc[0], top: explodeSrc[1], width: 0, height: 0};		}		// display temporarily, and move into position, then hide again		with(this.domNode.style){			display="";			zIndex = this.beginZIndex + this.popupIndex;		}		if(around){			this.move(node, padding, aroundOrient);		}else{			this.move(x, y, padding, orient);		}		this.domNode.style.display="none";		this.explodeSrc = explodeSrc;		// then use the user defined method to display it		this.show();		this.isShowingNow = true;	},
meta: 4707	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4707/50c3492c4c3c825dbd3401e134a19ed46799c456/PopupContainer.js/buggy/www/resources/dojo-ajax/src/widget/PopupContainer.js