Annotation of loncom/html/htmlarea/popups/popup.js, revision 1.1

1.1     ! www         1: function __dlg_onclose() {
        !             2: 	if (!document.all) {
        !             3: 		opener.Dialog._return(null);
        !             4: 	}
        !             5: };
        !             6: 
        !             7: function __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 + 50 + "px";
        !            30: 		window.dialogWidth = body.offsetWidth + "px";
        !            31: 	}
        !            32: };
        !            33: 
        !            34: // closes the dialog and passes the return info upper.
        !            35: function __dlg_close(val) {
        !            36: 	if (document.all) {	// IE
        !            37: 		window.returnValue = val;
        !            38: 	} else {
        !            39: 		opener.Dialog._return(val);
        !            40: 	}
        !            41: 	window.close();
        !            42: };

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>