if (!dojo._hasResource["dijit._base.popup"]) { // _hasResource checks added by // build. Do not use // _hasResource directly in your // code. dojo._hasResource["dijit._base.popup"] = true; dojo.provide("dijit._base.popup"); dojo.require("dijit._base.focus"); dojo.require("dijit._base.place"); dojo.require("dijit._base.window"); dijit.popup = new function() { // summary: // This class is used to show/hide widgets as popups. // var stack = [], beginZIndex = 1000, idGen = 1; this.open = function(/* Object */args) { // summary: // Popup the widget at the specified position // // args: Object // popup: Widget // widget to display, // parent: Widget // the button etc. that is displaying this popup // around: DomNode // DOM node (typically a button); place popup relative to this node // orient: Object // structure specifying possible positions of popup relative to // "around" node // onCancel: Function // callback when user has canceled the popup by // 1. hitting ESC or // 2. by using the popup widget's proprietary cancel mechanism (like // a cancel button in a dialog); // ie: whenever popupWidget.onCancel() is called, args.onCancel is // called // onClose: Function // callback whenever this popup is closed // onExecute: Function // callback when user "executed" on the popup/sub-popup by selecting // a menu choice, etc. (top menu only) // // examples: // 1. opening at the mouse position // dijit.popup.open({popup: menuWidget, x: evt.pageX, y: // evt.pageY}); // 2. opening the widget as a dropdown // dijit.popup.open({parent: this, popup: menuWidget, around: // this.domNode, onClose: function(){...} }); // // Note that whatever widget called dijit.popup.open() should also // listen to it's own _onBlur callback // (fired from _base/focus.js) to know that focus has moved // somewhere else and thus the popup should be closed. var widget = args.popup, orient = args.orient || { 'BL' : 'TL', 'TL' : 'BL' }, around = args.around, id = (args.around && args.around.id) ? (args.around.id + "_dropdown") : ("popup_" + idGen++); // make wrapper div to hold widget and possibly hold iframe behind // it. // we can't attach the iframe as a child of the widget.domNode // because // widget.domNode might be a ,