a:37:{s:9:"#provides";s:5:"dijit";s:9:"#resource";s:14:"_base/popup.js";s:9:"#requires";a:3:{i:0;a:2:{i:0;s:6:"common";i:1;s:17:"dijit._base.focus";}i:1;a:2:{i:0;s:6:"common";i:1;s:17:"dijit._base.place";}i:2;a:2:{i:0;s:6:"common";i:1;s:18:"dijit._base.window";}}s:11:"dijit.popup";a:5:{s:4:"type";s:8:"Function";s:11:"initialized";b:1;s:6:"source";s:7596:" var stack = [],
beginZIndex=1000,
idGen = 1;
this.prepare = function(/*DomNode*/ node){
// summary:
// Prepares a node to be used as a popup
//
// description:
// Attaches node to dojo.doc.body, and
// positions it off screen, but not display:none, so that
// the widget doesn't appear in the page flow and/or cause a blank
// area at the bottom of the viewport (making scrollbar longer), but
// initialization of contained widgets works correctly
var s = node.style;
s.visibility = "hidden"; // so TAB key doesn't navigate to hidden popup
s.position = "absolute";
s.top = "-9999px";
if(s.display == "none"){
s.display="";
}
dojo.body().appendChild(node);
};
dijit.popup.__OpenArgs = function(){
// 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. (Specify this *or* "x" and "y" parameters.)
// x: Integer
// Absolute horizontal position (in pixels) to place node at. (Specify this *or* "around" parameter.)
// y: Integer
// Absolute vertical position (in pixels) to place node at. (Specity this *or* "around" parameter.)
// orient: Object || String
// When the around parameter is specified, orient should be an
// ordered list of tuples of the form (around-node-corner, popup-node-corner).
// dijit.popup.open() tries to position the popup according to each tuple in the list, in order,
// until the popup appears fully within the viewport.
//
// The default value is {BL:'TL', TL:'BL'}, which represents a list of two tuples:
// 1. (BL, TL)
// 2. (TL, BL)
// where BL means "bottom left" and "TL" means "top left".
// So by default, it first tries putting the popup below the around node, left-aligning them,
// and then tries to put it above the around node, still left-aligning them. Note that the
// default is horizontally reversed when in RTL mode.
//
// When an (x,y) position is specified rather than an around node, orient is either
// "R" or "L". R (for right) means that it tries to put the popup to the right of the mouse,
// specifically positioning the popup's top-right corner at the mouse position, and if that doesn't
// fit in the viewport, then it tries, in order, the bottom-right corner, the top left corner,
// and the top-right corner.
// 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);
// i.e. 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)
// padding: dijit.__Position
// adding a buffer around the opening position. This is only useful when around is not set.
this.popup = popup;
this.parent = parent;
this.around = around;
this.x = x;
this.y = y;
this.orient = orient;
this.onCancel = onCancel;
this.onClose = onClose;
this.onExecute = onExecute;
this.padding = padding;
}
this.open = function(/*dijit.popup.__OpenArgs*/ args){
// summary:
// Popup the widget at the specified position
//
// example:
// opening at the mouse position
// | dijit.popup.open({popup: menuWidget, x: evt.pageX, y: evt.pageY});
//
// example:
// 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 its 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
, , etc.
var wrapper = dojo.create("div",{
id: id,
"class":"dijitPopup",
style:{
zIndex: beginZIndex + stack.length,
visibility:"hidden"
}
}, dojo.body());
dijit.setWaiRole(wrapper, "presentation");
// prevent transient scrollbar causing misalign (#5776)
wrapper.style.left = wrapper.style.top = "0px";
if(args.parent){
wrapper.dijitPopupParent=args.parent.id;
}
var s = widget.domNode.style;
s.display = "";
s.visibility = "";
s.position = "";
s.top = "0px";
wrapper.appendChild(widget.domNode);
var iframe = new dijit.BackgroundIframe(wrapper);
// position the wrapper node
var best = around ?
dijit.placeOnScreenAroundElement(wrapper, around, orient, widget.orient ? dojo.hitch(widget, "orient") : null) :
dijit.placeOnScreen(wrapper, args, orient == 'R' ? ['TR','BR','TL','BL'] : ['TL','BL','TR','BR'], args.padding);
wrapper.style.visibility = "visible";
// TODO: use effects to fade in wrapper
var handlers = [];
// Compute the closest ancestor popup that's *not* a child of another popup.
// Ex: For a TooltipDialog with a button that spawns a tree of menus, find the popup of the button.
var getTopPopup = function(){
for(var pi=stack.length-1; pi > 0 && stack[pi].parent === stack[pi-1].widget; pi--){
/* do nothing, just trying to get right value for pi */
}
return stack[pi];
}
// provide default escape and tab key handling
// (this will work for any widget, not just menu)
handlers.push(dojo.connect(wrapper, "onkeypress", this, function(evt){
if(evt.charOrCode == dojo.keys.ESCAPE && args.onCancel){
dojo.stopEvent(evt);
args.onCancel();
}else if(evt.charOrCode === dojo.keys.TAB){
dojo.stopEvent(evt);
var topPopup = getTopPopup();
if(topPopup && topPopup.onCancel){
topPopup.onCancel();
}
}
}));
// watch for cancel/execute events on the popup and notify the caller
// (for a menu, "execute" means clicking an item)
if(widget.onCancel){
handlers.push(dojo.connect(widget, "onCancel", null, args.onCancel));
}
handlers.push(dojo.connect(widget, widget.onExecute ? "onExecute" : "onChange", null, function(){
var topPopup = getTopPopup();
if(topPopup && topPopup.onExecute){
topPopup.onExecute();
}
}));
stack.push({
wrapper: wrapper,
iframe: iframe,
widget: widget,
parent: args.parent,
onExecute: args.onExecute,
onCancel: args.onCancel,
onClose: args.onClose,
handlers: handlers
});
if(widget.onOpen){
widget.onOpen(best);
}
return best;
};
this.close = function(/*Widget*/ popup){
// summary:
// Close specified popup and any popups that it parented
while(dojo.some(stack, function(elem){return elem.widget == popup;})){
var top = stack.pop(),
wrapper = top.wrapper,
iframe = top.iframe,
widget = top.widget,
onClose = top.onClose;
if(widget.onClose){
widget.onClose();
}
dojo.forEach(top.handlers, dojo.disconnect);
// #2685: check if the widget still has a domNode so ContentPane can change its URL without getting an error
if(!widget||!widget.domNode){ return; }
this.prepare(widget.domNode);
iframe.destroy();
dojo.destroy(wrapper);
if(onClose){
onClose();
}
}
};";s:7:"summary";s:50:"This class is used to show/hide widgets as popups.";s:9:"classlike";b:1;}s:22:"dijit.popup.__OpenArgs";a:5:{s:4:"type";s:8:"Function";s:6:"source";s:3492:"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.prepare = function(/*DomNode*/ node){
// summary:
// Prepares a node to be used as a popup
//
// description:
// Attaches node to dojo.doc.body, and
// positions it off screen, but not display:none, so that
// the widget doesn't appear in the page flow and/or cause a blank
// area at the bottom of the viewport (making scrollbar longer), but
// initialization of contained widgets works correctly
var s = node.style;
s.visibility = "hidden"; // so TAB key doesn't navigate to hidden popup
s.position = "absolute";
s.top = "-9999px";
if(s.display == "none"){
s.display="";
}
dojo.body().appendChild(node);
};
dijit.popup.__OpenArgs = function(){
// 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. (Specify this *or* "x" and "y" parameters.)
// x: Integer
// Absolute horizontal position (in pixels) to place node at. (Specify this *or* "around" parameter.)
// y: Integer
// Absolute vertical position (in pixels) to place node at. (Specity this *or* "around" parameter.)
// orient: Object || String
// When the around parameter is specified, orient should be an
// ordered list of tuples of the form (around-node-corner, popup-node-corner).
// dijit.popup.open() tries to position the popup according to each tuple in the list, in order,
// until the popup appears fully within the viewport.
//
// The default value is {BL:'TL', TL:'BL'}, which represents a list of two tuples:
// 1. (BL, TL)
// 2. (TL, BL)
// where BL means "bottom left" and "TL" means "top left".
// So by default, it first tries putting the popup below the around node, left-aligning them,
// and then tries to put it above the around node, still left-aligning them. Note that the
// default is horizontally reversed when in RTL mode.
//
// When an (x,y) position is specified rather than an around node, orient is either
// "R" or "L". R (for right) means that it tries to put the popup to the right of the mouse,
// specifically positioning the popup's top-right corner at the mouse position, and if that doesn't
// fit in the viewport, then it tries, in order, the bottom-right corner, the top left corner,
// and the top-right corner.
// 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);
// i.e. 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)
// padding: dijit.__Position
// adding a buffer around the opening position. This is only useful when around is not set.
this.popup = popup;
this.parent = parent;
this.around = around;
this.x = x;
this.y = y;
this.orient = orient;
this.onCancel = onCancel;
this.onClose = onClose;
this.onExecute = onExecute;
this.padding = padding;";s:7:"private";b:1;s:9:"classlike";b:1;s:7:"summary";s:0:"";}s:28:"dijit.popup.__OpenArgs.popup";a:4:{s:8:"instance";s:22:"dijit.popup.__OpenArgs";s:4:"type";s:6:"Widget";s:7:"summary";s:17:"widget to display";s:14:"private_parent";b:1;}s:29:"dijit.popup.__OpenArgs.parent";a:4:{s:8:"instance";s:22:"dijit.popup.__OpenArgs";s:4:"type";s:6:"Widget";s:7:"summary";s:45:"the button etc. that is displaying this popup";s:14:"private_parent";b:1;}s:29:"dijit.popup.__OpenArgs.around";a:4:{s:8:"instance";s:22:"dijit.popup.__OpenArgs";s:4:"type";s:7:"DomNode";s:7:"summary";s:130:"DOM node (typically a button); place popup relative to this node. (Specify this *or* "x" and "y" parameters.)";s:14:"private_parent";b:1;}s:24:"dijit.popup.__OpenArgs.x";a:4:{s:8:"instance";s:22:"dijit.popup.__OpenArgs";s:4:"type";s:7:"Integer";s:7:"summary";s:109:"Absolute horizontal position (in pixels) to place node at. (Specify this *or* "around" parameter.)";s:14:"private_parent";b:1;}s:24:"dijit.popup.__OpenArgs.y";a:4:{s:8:"instance";s:22:"dijit.popup.__OpenArgs";s:4:"type";s:7:"Integer";s:7:"summary";s:107:"Absolute vertical position (in pixels) to place node at. (Specity this *or* "around" parameter.)";s:14:"private_parent";b:1;}s:29:"dijit.popup.__OpenArgs.orient";a:4:{s:8:"instance";s:22:"dijit.popup.__OpenArgs";s:4:"type";s:6:"Object";s:7:"summary";s:1121:"|| String
When the around parameter is specified, orient should be an
ordered list of tuples of the form (around-node-corner, popup-node-corner).
dijit.popup.open() tries to position the popup according to each tuple in the list, in order,
until the popup appears fully within the viewport.
The default value is {BL:'TL', TL:'BL'}, which represents a list of two tuples:
1. (BL, TL)
2. (TL, BL)
where BL means "bottom left" and "TL" means "top left".
So by default, it first tries putting the popup below the around node, left-aligning them,
and then tries to put it above the around node, still left-aligning them. Note that the
default is horizontally reversed when in RTL mode.
When an (x,y) position is specified rather than an around node, orient is either
"R" or "L". R (for right) means that it tries to put the popup to the right of the mouse,
specifically positioning the popup's top-right corner at the mouse position, and if that doesn't
fit in the viewport, then it tries, in order, the bottom-right corner, the top left corner,
and the top-right corner.";s:14:"private_parent";b:1;}s:31:"dijit.popup.__OpenArgs.onCancel";a:4:{s:8:"instance";s:22:"dijit.popup.__OpenArgs";s:4:"type";s:8:"Function";s:7:"summary";s:230:"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);
i.e. whenever popupWidget.onCancel() is called, args.onCancel is called";s:14:"private_parent";b:1;}s:30:"dijit.popup.__OpenArgs.onClose";a:4:{s:8:"instance";s:22:"dijit.popup.__OpenArgs";s:4:"type";s:8:"Function";s:7:"summary";s:38:"callback whenever this popup is closed";s:14:"private_parent";b:1;}s:32:"dijit.popup.__OpenArgs.onExecute";a:4:{s:8:"instance";s:22:"dijit.popup.__OpenArgs";s:4:"type";s:8:"Function";s:7:"summary";s:111:"callback when user "executed" on the popup/sub-popup by selecting a menu choice, etc. (top menu only)";s:14:"private_parent";b:1;}s:30:"dijit.popup.__OpenArgs.padding";a:4:{s:8:"instance";s:22:"dijit.popup.__OpenArgs";s:4:"type";s:16:"dijit.__Position";s:7:"summary";s:88:"adding a buffer around the opening position. This is only useful when around is not set.";s:14:"private_parent";b:1;}s:11:"beginZIndex";a:1:{s:7:"summary";s:0:"";}s:5:"idGen";a:1:{s:7:"summary";s:0:"";}s:19:"dijit.popup.prepare";a:6:{s:8:"instance";s:11:"dijit.popup";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:4:"node";a:1:{s:4:"type";s:7:"DomNode";}}s:6:"source";s:224:" var s = node.style;
s.visibility = "hidden"; // so TAB key doesn't navigate to hidden popup
s.position = "absolute";
s.top = "-9999px";
if(s.display == "none"){
s.display="";
}
dojo.body().appendChild(node);";s:7:"summary";s:37:"Prepares a node to be used as a popup";s:11:"description";s:272:"Attaches node to dojo.doc.body, and
positions it off screen, but not display:none, so that
the widget doesn't appear in the page flow and/or cause a blank
area at the bottom of the viewport (making scrollbar longer), but
initialization of contained widgets works correctly";}s:17:"dijit.popup.popup";a:2:{s:8:"instance";s:11:"dijit.popup";s:7:"summary";s:0:"";}s:18:"dijit.popup.parent";a:2:{s:8:"instance";s:11:"dijit.popup";s:7:"summary";s:0:"";}s:18:"dijit.popup.around";a:2:{s:8:"instance";s:11:"dijit.popup";s:7:"summary";s:0:"";}s:13:"dijit.popup.x";a:2:{s:8:"instance";s:11:"dijit.popup";s:7:"summary";s:0:"";}s:13:"dijit.popup.y";a:2:{s:8:"instance";s:11:"dijit.popup";s:7:"summary";s:0:"";}s:18:"dijit.popup.orient";a:2:{s:8:"instance";s:11:"dijit.popup";s:7:"summary";s:0:"";}s:20:"dijit.popup.onCancel";a:2:{s:8:"instance";s:11:"dijit.popup";s:7:"summary";s:0:"";}s:19:"dijit.popup.onClose";a:2:{s:8:"instance";s:11:"dijit.popup";s:7:"summary";s:0:"";}s:21:"dijit.popup.onExecute";a:2:{s:8:"instance";s:11:"dijit.popup";s:7:"summary";s:0:"";}s:19:"dijit.popup.padding";a:2:{s:8:"instance";s:11:"dijit.popup";s:7:"summary";s:0:"";}s:16:"dijit.popup.open";a:6:{s:8:"instance";s:11:"dijit.popup";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:4:"args";a:1:{s:4:"type";s:22:"dijit.popup.__OpenArgs";}}s:6:"source";s:2973:" 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 , , etc.
var wrapper = dojo.create("div",{
id: id,
"class":"dijitPopup",
style:{
zIndex: beginZIndex + stack.length,
visibility:"hidden"
}
}, dojo.body());
dijit.setWaiRole(wrapper, "presentation");
// prevent transient scrollbar causing misalign (#5776)
wrapper.style.left = wrapper.style.top = "0px";
if(args.parent){
wrapper.dijitPopupParent=args.parent.id;
}
var s = widget.domNode.style;
s.display = "";
s.visibility = "";
s.position = "";
s.top = "0px";
wrapper.appendChild(widget.domNode);
var iframe = new dijit.BackgroundIframe(wrapper);
// position the wrapper node
var best = around ?
dijit.placeOnScreenAroundElement(wrapper, around, orient, widget.orient ? dojo.hitch(widget, "orient") : null) :
dijit.placeOnScreen(wrapper, args, orient == 'R' ? ['TR','BR','TL','BL'] : ['TL','BL','TR','BR'], args.padding);
wrapper.style.visibility = "visible";
// TODO: use effects to fade in wrapper
var handlers = [];
// Compute the closest ancestor popup that's *not* a child of another popup.
// Ex: For a TooltipDialog with a button that spawns a tree of menus, find the popup of the button.
var getTopPopup = function(){
for(var pi=stack.length-1; pi > 0 && stack[pi].parent === stack[pi-1].widget; pi--){
/* do nothing, just trying to get right value for pi */
}
return stack[pi];
}
// provide default escape and tab key handling
// (this will work for any widget, not just menu)
handlers.push(dojo.connect(wrapper, "onkeypress", this, function(evt){
if(evt.charOrCode == dojo.keys.ESCAPE && args.onCancel){
dojo.stopEvent(evt);
args.onCancel();
}else if(evt.charOrCode === dojo.keys.TAB){
dojo.stopEvent(evt);
var topPopup = getTopPopup();
if(topPopup && topPopup.onCancel){
topPopup.onCancel();
}
}
}));
// watch for cancel/execute events on the popup and notify the caller
// (for a menu, "execute" means clicking an item)
if(widget.onCancel){
handlers.push(dojo.connect(widget, "onCancel", null, args.onCancel));
}
handlers.push(dojo.connect(widget, widget.onExecute ? "onExecute" : "onChange", null, function(){
var topPopup = getTopPopup();
if(topPopup && topPopup.onExecute){
topPopup.onExecute();
}
}));
stack.push({
wrapper: wrapper,
iframe: iframe,
widget: widget,
parent: args.parent,
onExecute: args.onExecute,
onCancel: args.onCancel,
onClose: args.onClose,
handlers: handlers
});
if(widget.onOpen){
widget.onOpen(best);
}
return best;";s:7:"summary";s:42:"Popup the widget at the specified position";s:8:"examples";a:2:{i:0;s:99:"opening at the mouse position
dijit.popup.open({popup: menuWidget, x: evt.pageX, y: evt.pageY});";i:1;s:348:"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 its own _onBlur callback
(fired from _base/focus.js) to know that focus has moved somewhere else and thus the popup should be closed.";}}s:17:"dijit.popup.close";a:5:{s:8:"instance";s:11:"dijit.popup";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:5:"popup";a:1:{s:4:"type";s:6:"Widget";}}s:6:"source";s:591:" while(dojo.some(stack, function(elem){return elem.widget == popup;})){
var top = stack.pop(),
wrapper = top.wrapper,
iframe = top.iframe,
widget = top.widget,
onClose = top.onClose;
if(widget.onClose){
widget.onClose();
}
dojo.forEach(top.handlers, dojo.disconnect);
// #2685: check if the widget still has a domNode so ContentPane can change its URL without getting an error
if(!widget||!widget.domNode){ return; }
this.prepare(widget.domNode);
iframe.destroy();
dojo.destroy(wrapper);
if(onClose){
onClose();
}
}";s:7:"summary";s:53:"Close specified popup and any popups that it parented";}s:13:"dijit._frames";a:6:{s:4:"type";s:8:"Function";s:11:"initialized";b:1;s:6:"source";s:979:" var queue = [];
this.pop = function(){
var iframe;
if(queue.length){
iframe = queue.pop();
iframe.style.display="";
}else{
if(dojo.isIE){
var burl = dojo.config["dojoBlankHtmlUrl"] || (dojo.moduleUrl("dojo", "resources/blank.html")+"") || "javascript:\"\"";
var html="