dialog.js
Summary
No overview generated for 'dialog.js'
function Dialog(url, name, width, height, action, init) {
if (typeof init == "undefined") {
init = window;
}
Dialog._geckoOpenModal(url, name, width, height, action, init);
};
Dialog._parentEvent = function(ev) {
if (Dialog._modal && !Dialog._modal.closed) {
Dialog._modal.focus();
Zapatec.Utils.stopEvent(ev);
}
};
Dialog._return = null;
Dialog._modal = null;
Dialog._arguments = null;
Dialog._geckoOpenModal = function(url, name, width, height, action, init) {
var dlg = Zapatec.Utils.newCenteredWindow(url, name, width, height, 'no');
Dialog._modal = dlg;
Dialog._arguments = init;
function capwin(w) {
Zapatec.Utils.addEvent(w, "click", Dialog._parentEvent);
Zapatec.Utils.addEvent(w, "mousedown", Dialog._parentEvent);
Zapatec.Utils.addEvent(w, "focus", Dialog._parentEvent);
};
function relwin(w) {
Zapatec.Utils.removeEvent(w, "click", Dialog._parentEvent);
Zapatec.Utils.removeEvent(w, "mousedown", Dialog._parentEvent);
Zapatec.Utils.removeEvent(w, "focus", Dialog._parentEvent);
};
capwin(window);
for (var i = 0; i < window.frames.length; capwin(window.frames[i++]));
Dialog._return = function (val) {
if (val && action) {
action(val);
}
relwin(window);
for (var i = 0; i < window.frames.length; relwin(window.frames[i++]));
Dialog._modal = null;
};
};
Documentation generated by
JSDoc on Thu Aug 16 12:18:39 2007