source: www/openwebmail/javascript/htmlarea.openwebmail/popups/sl/popup.js@ 1

Last change on this file since 1 was 1, checked in by george, 18 years ago

Prvotní import všeho

File size: 1.2 KB
Line 
1function __dlg_onclose() {
2 if (!document.all) {
3 opener.Dialog._return(null);
4 }
5};
6
7function __dlg_init() {
8 if (!document.all) {
9 // init dialogArguments, as IE gets it
10 window.dialogArguments = opener.Dialog._arguments;
11 window.sizeToContent();
12 window.sizeToContent(); // for reasons beyond understanding,
13 // only if we call it twice we get the
14 // correct size.
15 window.addEventListener("unload", __dlg_onclose, true);
16 // center on parent
17 var px1 = opener.screenX;
18 var px2 = opener.screenX + opener.outerWidth;
19 var py1 = opener.screenY;
20 var py2 = opener.screenY + opener.outerHeight;
21 var x = (px2 - px1 - window.outerWidth) / 2;
22 var y = (py2 - py1 - window.outerHeight) / 2;
23 window.moveTo(x, y);
24 var body = document.body;
25 window.innerHeight = body.offsetHeight;
26 window.innerWidth = body.offsetWidth;
27 } else {
28 var body = document.body;
29 window.dialogHeight = body.offsetHeight + 90 + "px";
30 window.dialogWidth = body.offsetWidth + "px";
31 }
32};
33
34// closes the dialog and passes the return info upper.
35function __dlg_close(val) {
36 if (document.all) { // IE
37 window.returnValue = val;
38 } else {
39 opener.Dialog._return(val);
40 }
41 window.close();
42};
Note: See TracBrowser for help on using the repository browser.