2004-04-21 21:52:49 +02:00
|
|
|
function __dlg_onclose() {
|
|
|
|
if (!document.all) {
|
|
|
|
opener.Dialog._return(null);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2004-09-28 23:06:25 +02:00
|
|
|
function __dlg_init()
|
|
|
|
{
|
2004-04-21 21:52:49 +02:00
|
|
|
|
|
|
|
if (!document.all) {
|
|
|
|
// init dialogArguments, as IE gets it
|
|
|
|
window.dialogArguments = opener.Dialog._arguments;
|
|
|
|
window.sizeToContent();
|
2004-09-28 23:06:25 +02:00
|
|
|
window.sizeToContent();
|
|
|
|
// for reasons beyond understanding,
|
2004-04-21 21:52:49 +02:00
|
|
|
// only if we call it twice we get the
|
|
|
|
// correct size.
|
|
|
|
window.addEventListener("unload", __dlg_onclose, true);
|
|
|
|
/*
|
|
|
|
// center on parent
|
|
|
|
var px1 = opener.screenX;
|
|
|
|
var px2 = opener.screenX + opener.outerWidth;
|
|
|
|
var py1 = opener.screenY;
|
|
|
|
var py2 = opener.screenY + opener.outerHeight;
|
|
|
|
var x = (px2 - px1 - window.outerWidth) / 2;
|
|
|
|
var y = (py2 - py1 - window.outerHeight) / 2; */
|
|
|
|
|
|
|
|
//centre on screen instead
|
|
|
|
|
|
|
|
var x = (screen.width - window.outerWidth) / 2;
|
|
|
|
var y = (screen.height - window.outerHeight) / 2;
|
|
|
|
|
|
|
|
window.moveTo(x, y);
|
|
|
|
var body = document.body;
|
|
|
|
window.innerHeight = body.offsetHeight;
|
|
|
|
window.innerWidth = body.offsetWidth;
|
|
|
|
} else {
|
2004-09-28 23:06:25 +02:00
|
|
|
//var body = document.body;
|
|
|
|
window.resizeBy(500, 350)
|
|
|
|
//window.dialogHeight = body.offsetHeight + 50 + "px";
|
|
|
|
//window.dialogWidth = body.offsetWidth + "px";
|
2004-04-21 21:52:49 +02:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
// closes the dialog and passes the return info upper.
|
|
|
|
function __dlg_close(val) {
|
2004-09-28 23:06:25 +02:00
|
|
|
if (document.all)
|
|
|
|
{ // IE
|
|
|
|
//alert(val);
|
|
|
|
opener.Dialog._return(val);
|
|
|
|
//window.returnValue = val;
|
2004-04-21 21:52:49 +02:00
|
|
|
} else {
|
|
|
|
opener.Dialog._return(val);
|
|
|
|
}
|
|
|
|
window.close();
|
|
|
|
};
|