diff --git a/addressbook/inc/class.addressbook_hooks.inc.php b/addressbook/inc/class.addressbook_hooks.inc.php index 09181a457c..ba6c46d960 100644 --- a/addressbook/inc/class.addressbook_hooks.inc.php +++ b/addressbook/inc/class.addressbook_hooks.inc.php @@ -361,13 +361,13 @@ class addressbook_hooks 'menuaction' => 'addressbook.addressbook_ui.edit' ), 'edit_id' => 'contact_id', - 'edit_popup' => '800x525', + 'edit_popup' => '859x550', 'add' => array( 'menuaction' => 'addressbook.addressbook_ui.edit' ), 'add_app' => 'link_app', 'add_id' => 'link_id', - 'add_popup' => '800x525', + 'add_popup' => '859x550', 'file_access_user' => true, // file_access supports 4th parameter $user 'file_access'=> 'addressbook.addressbook_bo.file_access', 'default_types' => array('n' => array('name' => 'contact', 'options' => array('icon' => 'navbar.png','template' => 'addressbook.edit'))), diff --git a/phpgwapi/js/jsapi/egw.js b/phpgwapi/js/jsapi/egw.js index cd944e40a6..543e3ae844 100644 --- a/phpgwapi/js/jsapi/egw.js +++ b/phpgwapi/js/jsapi/egw.js @@ -224,7 +224,21 @@ { // Resize popup when et2 load is done jQuery(node).one("load",function() { - window.resizeTo(jQuery(document).width()+45,jQuery(document).height()+100); + var $main_div = $j('#popupMainDiv'); + var $et2 = $j('.et2_container'); + var w = { + width: egw_getWindowInnerWidth(), + height: egw_getWindowInnerHeight() + }; + // Use et2_container for width since #popupMainDiv is full width, but we still need + // to take padding/margin into account + var delta_width = w.width - ($et2.outerWidth(true) + ($main_div.outerWidth(true) - $main_div.width())); + var delta_height = w.height - ($et2.outerHeight(true) + ($main_div.outerHeight(true) - $main_div.height())); + debugger; + if(delta_width != 0 || delta_height != 0) + { + window.resizeTo(egw_getWindowOuterWidth() - delta_width,egw_getWindowOuterHeight() - delta_height); + } }); } var et2 = new etemplate2(node, currentapp+".etemplate_new.ajax_process_content.etemplate");