From de5c55801596f14be6a6a48756681cace32dfed0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20St=C3=B6ckel?= Date: Wed, 9 Jun 2010 14:41:53 +0000 Subject: [PATCH] Fixed errors with non-defined "tree" element in xajax responses in felamimail --- phpgwapi/js/jsapi/jsapi.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/phpgwapi/js/jsapi/jsapi.js b/phpgwapi/js/jsapi/jsapi.js index 7739738074..a9877adc50 100644 --- a/phpgwapi/js/jsapi/jsapi.js +++ b/phpgwapi/js/jsapi/jsapi.js @@ -39,6 +39,21 @@ else if (document.layers) is_ns4 = true; } +/** + * Returns the top window which contains the current egw_instance, even for popup windows + */ +function egw_topWindow() +{ + if (window.opener) + { + return window.opener.top; + } + else + { + return window.top; + } +} + /** * Returns the window object of the current application * @param string _app is the name of the application which requests the window object