Index: branches/RC/core/admin_templates/incs/close_popup.tpl =================================================================== diff -u -N -r11538 -r11665 --- branches/RC/core/admin_templates/incs/close_popup.tpl (.../close_popup.tpl) (revision 11538) +++ branches/RC/core/admin_templates/incs/close_popup.tpl (.../close_popup.tpl) (revision 11665) @@ -41,17 +41,29 @@ } function onAfterWindowClose($opener) { - - var $skip_refresh = true; + + var $ru = $redirect_url; + + // setTimeout allows to call method indirectly. Without it whole idea won't work 2nd time (try adding 2 relations one after another) + $opener.setTimeout( + function() { + $opener.openSelector('adm', $ru.replace('%5C', '\\') + '&merge_opener_stack=1'); + }, + 200 + ); - var $skip_refresh = isset($opener.$skip_refresh) && $opener.$skip_refresh ? true : false; - + + var $skip_refresh = true; + + var $skip_refresh = isset($opener.$skip_refresh) && $opener.$skip_refresh ? true : false; + - $opener.focus(); + $opener.focus(); - if (!$skip_refresh) { - $opener.location.href = $redirect_url.replace('%5C', '\\'); - } + if (!$skip_refresh) { + $opener.location.href = $redirect_url.replace('%5C', '\\'); + } + } // copied from "js/script.js" because it's not included here due performance reasons