From 6985c3d61fdc04fbc59fbc7c0dabd86dcd3e076c Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Thu, 21 Nov 2013 19:09:17 +0000 Subject: [PATCH] Resize popups according to their content --- phpgwapi/js/jsapi/egw.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/phpgwapi/js/jsapi/egw.js b/phpgwapi/js/jsapi/egw.js index 93fe0129ee..22f9f12792 100644 --- a/phpgwapi/js/jsapi/egw.js +++ b/phpgwapi/js/jsapi/egw.js @@ -178,6 +178,13 @@ } else { + if(popup || window.opener) + { + // Resize popup when et2 load is done + jQuery(node).one("load",function() { + window.resizeTo(jQuery(document).width()+10,jQuery(document).height()+60); + }); + } var et2 = new etemplate2(node, window.egw_appName+".etemplate_new.ajax_process_content.etemplate"); et2.load(data.name,data.url,data.data,callback); }