Commit 1bf137a1 by Klimov Paul

AuthClient js redirect advanced.

parent 641e1673
...@@ -8,11 +8,12 @@ use yii\helpers\Json; ...@@ -8,11 +8,12 @@ use yii\helpers\Json;
$redirectJavaScript = <<<EOL $redirectJavaScript = <<<EOL
function popupWindowRedirect(url, enforceRedirect) { function popupWindowRedirect(url, enforceRedirect) {
if (window.opener) { if (window.opener && !window.opener.closed) {
window.close();
if (enforceRedirect === undefined || enforceRedirect) { if (enforceRedirect === undefined || enforceRedirect) {
window.opener.location = url; window.opener.location = url;
} }
window.opener.focus();
window.close();
} else { } else {
window.location = url; window.location = url;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment