Index: branches/5.1.x/core/admin_templates/incs/close_popup.tpl
===================================================================
diff -u -N -r13086 -r14210
--- branches/5.1.x/core/admin_templates/incs/close_popup.tpl (.../close_popup.tpl) (revision 13086)
+++ branches/5.1.x/core/admin_templates/incs/close_popup.tpl (.../close_popup.tpl) (revision 14210)
@@ -30,7 +30,11 @@
if ($opener) {
// using popups & close_popup called (from anywhere)
try {
- window_close( function() { onAfterWindowClose($opener); } );
+ window_close(
+ function() {
+ $opener.onAfterWindowClose($redirect_url, truefalse, truefalse);
+ }
+ );
}
catch (err) {
// another website is opened in parent window
@@ -43,32 +47,6 @@
}
}
- function onAfterWindowClose($opener) {
-
- 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 = true;
-
- var $skip_refresh = isset($opener.$skip_refresh) && $opener.$skip_refresh ? true : false;
-
-
- $opener.focus();
-
- if (!$skip_refresh) {
- $opener.location.href = $redirect_url.replace('%5C', '\\');
- }
-
- }
-
// copied from "js/script.js" because it's not included here due performance reasons
function getFrame($name) {
var $main_window = window;