[BUGFIX] EM: Fix button "close window" after fulfilling dependencies
authorKay Strobach <typo3@kay-strobach.de>
Tue, 11 Oct 2011 06:38:27 +0000 (08:38 +0200)
committerJigal van Hemert <jigal@xs4all.nl>
Tue, 11 Oct 2011 13:27:39 +0000 (15:27 +0200)
This fix opens the window in a sized window and changes the logic to
determine the correct function for closing the window.

Change-Id: Ie16d67284240a833e5bfae67d8b78eab808f9a79
Releases: 4.6
Resolves: #29788
Reviewed-on: http://review.typo3.org/5706
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers
Reviewed-by: Jigal van Hemert
Tested-by: Jigal van Hemert
typo3/sysext/em/classes/index.php
typo3/sysext/em/classes/install/class.tx_em_install.php

index eedea48..2439855 100644 (file)
@@ -2571,7 +2571,7 @@ class SC_mod_tools_em_index extends t3lib_SCbase {
                                $GLOBALS['LANG']->getLL('ext_import_close_check') . '</a>';
                        return $link;
                } else {
-                       return '<a id="closewindow" href="javascript:if (parent.TYPO3.EM) {parent.TYPO3.EM.Tools.closeImportWindow();} else {window.close();}">' . $GLOBALS['LANG']->getLL('ext_import_close') . '</a>';
+                       return '<a id="closewindow" href="javascript:if (parent.TYPO3.EM && top.frames.length) {parent.TYPO3.EM.Tools.closeImportWindow();} else {window.close();}">' . $GLOBALS['LANG']->getLL('ext_import_close') . '</a>';
                }
        }
 
index d2a50ba..f3dc963 100644 (file)
@@ -493,25 +493,25 @@ class tx_em_Install {
                                                $msg[] = '<br />' . sprintf($GLOBALS['LANG']->getLL('checkDependencies_ext_not_available'),
                                                        $depK);
                                                $msg[] = '&nbsp;&nbsp;&nbsp;&nbsp;' . t3lib_iconWorks::getSpriteIcon('actions-system-extension-import', array('title' => $GLOBALS['LANG']->getLL('checkDependencies_import_ext'))) . '&nbsp;
-                                                       <a href="' . t3lib_div::linkThisUrl($this->parentObject->script, array(
+                                                       <a href="#" onclick="window.open(\'' . t3lib_div::linkThisUrl($this->parentObject->script, array(
                                                        'CMD[importExt]' => $depK,
                                                        'CMD[loc]' => 'L',
                                                        'CMD[standAlone]' => 1
-                                               )) . '" target="_blank">' . $GLOBALS['LANG']->getLL('checkDependencies_import_now') . '</a>';
+                                               )) . '\', \'' . md5($instExtInfo[$depK]['EM_CONF']['title']) . '\', \'width=650, height=500\'); return false;" target="_blank">' . $GLOBALS['LANG']->getLL('checkDependencies_import_now') . '</a>';
                                                $msg[] = '&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" value="1" name="depsolver[ignore][' . $depK . ']" id="checkIgnore_' . $depK . '" />
                                                        <label for="checkIgnore_' . $depK . '">' . $GLOBALS['LANG']->getLL('checkDependencies_ignore_ext_requirement') . '</label>';
                                        } else {
                                                $msg[] = '<br />' . sprintf($GLOBALS['LANG']->getLL('checkDependencies_ext_not_installed'),
                                                        $depK, $instExtInfo[$depK]['EM_CONF']['title']);
                                                $msg[] = '&nbsp;&nbsp;&nbsp;&nbsp;' . tx_em_Tools::installButton() . '&nbsp;
-                                                       <a href="' . t3lib_div::linkThisUrl($this->parentObject->script, array(
+                                                       <a href="#" onclick="window.open(\'' . t3lib_div::linkThisUrl($this->parentObject->script, array(
                                                        'CMD[showExt]' => $depK,
                                                        'CMD[load]' => 1,
                                                        'CMD[clrCmd]' => 1,
                                                        'CMD[standAlone]' => 1,
                                                        'SET[singleDetails]' => 'info'
                                                )) .
-                                                               '" target="_blank">' . $GLOBALS['LANG']->getLL('checkDependencies_install_now') . '</a>';
+                                                               '\', \'' . md5($instExtInfo[$depK]['EM_CONF']['title']) . '\', \'width=650, height=500\'); return false; " target="_blank">' . $GLOBALS['LANG']->getLL('checkDependencies_install_now') . '</a>';
                                                $msg[] = '&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" value="1" name="depsolver[ignore][' . $depK . ']" id="checkIgnore_' . $depK . '" />
                                                        <label for="checkIgnore_' . $depK . '">' . $GLOBALS['LANG']->getLL('checkDependencies_ignore_ext_requirement') . '</label>';
                                        }
@@ -607,25 +607,25 @@ class tx_em_Install {
                                                $msg[] = sprintf($GLOBALS['LANG']->getLL('checkDependencies_suggest_import'),
                                                        $suggestK);
                                                $msg[] = '&nbsp;&nbsp;&nbsp;&nbsp;' . t3lib_iconWorks::getSpriteIcon('actions-system-extension-import', array('title' => $GLOBALS['LANG']->getLL('checkDependencies_import_ext'))) . '&nbsp;
-                                                       <a href="' . t3lib_div::linkThisScript(array(
+                                                       <a href="#" onclick="window.open(\'' . t3lib_div::linkThisScript(array(
                                                        'CMD[importExt]' => $suggestK,
                                                        'CMD[loc]' => 'L',
                                                        'CMD[standAlone]' => 1
-                                               )) . '" target="_blank">' . $GLOBALS['LANG']->getLL('checkDependencies_import_now') . '</a>';
+                                               )) . '\', \'' . md5($suggestK) . '\', \'width=650, height=500\'); return false; " target="_blank">' . $GLOBALS['LANG']->getLL('checkDependencies_import_now') . '</a>';
                                                $msg[] = '&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" value="1" name="depsolver[ignore][' . $suggestK . ']" id="checkIgnore_' . $suggestK . '" />
                                                        <label for="checkIgnore_' . $suggestK . '">' . $GLOBALS['LANG']->getLL('checkDependencies_ignore_suggestion') . '</label>';
                                        } else {
                                                $msg[] = sprintf($GLOBALS['LANG']->getLL('checkDependencies_suggest_installation'),
                                                        $suggestK, $instExtInfo[$suggestK]['EM_CONF']['title']);
                                                $msg[] = '&nbsp;&nbsp;&nbsp;&nbsp;' . tx_em_Tools::installButton() . '&nbsp;
-                                                       <a href="' . htmlspecialchars(t3lib_div::linkThisScript(array(
+                                                       <a href="#" onclick="window.open(\''  . htmlspecialchars(t3lib_div::linkThisScript(array(
                                                        'CMD[showExt]' => $suggestK,
                                                        'CMD[load]' => 1,
                                                        'CMD[clrCmd]' => 1,
                                                        'CMD[standAlone]' => 1,
                                                        'SET[singleDetails]' => 'info'
                                                ))) .
-                                                               '" target="_blank">' . $GLOBALS['LANG']->getLL('checkDependencies_install_now') . '</a>';
+                                                               '\', \'' . md5($suggestK) . '\', \'width=650, height=500\'); return false; " target="_blank">' . $GLOBALS['LANG']->getLL('checkDependencies_install_now') . '</a>';
                                                $msg[] = '&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" value="1" name="depsolver[ignore][' . $suggestK . ']" id="checkIgnore_' . $suggestK . '" />
                                                        <label for="checkIgnore_' . $suggestK . '">' . $GLOBALS['LANG']->getLL('checkDependencies_ignore_suggestion') . '</label>';
                                        }