[TASK] Move close.html to ext:backend 69/41169/6
authorWouter Wolters <typo3@wouterwolters.nl>
Tue, 14 Jul 2015 09:37:26 +0000 (11:37 +0200)
committerMarkus Klein <markus.klein@typo3.org>
Tue, 14 Jul 2015 11:27:37 +0000 (13:27 +0200)
To clean the typo3/ directory we move close.html
to ext:backend.

Resolves: #68108
Releases: master
Change-Id: Ieee52bd3ebea8f5c3f1c7f594d6d565864e07a76
Reviewed-on: http://review.typo3.org/41169
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
typo3/close.html [deleted file]
typo3/sysext/backend/Classes/Controller/EditDocumentController.php
typo3/sysext/backend/Resources/Private/Templates/Close.html [new file with mode: 0644]
typo3/sysext/feedit/Classes/FrontendEditPanel.php

diff --git a/typo3/close.html b/typo3/close.html
deleted file mode 100644 (file)
index eb6ab3f..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<?xml-stylesheet href="#internalStyle" type="text/css"?>
-<!DOCTYPE html
-     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-<head>
-
-       <!-- Close script, used in particular by FormEngine to close the current edit window -->
-
-       <!-- TYPO3 Script ID: typo3/close.html -->
-       <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-       <title>Close</title>
-                       <script type="text/javascript">
-                       /*<![CDATA[*/
-                               self.close();
-                               window.opener.location.reload(true);
-                       /*]]>*/
-                       </script>
-</head>
-<body>
-</body>
-</html>
index c8adb81..ac0f7be 100644 (file)
@@ -1255,7 +1255,7 @@ class EditDocumentController {
         * @return string
         */
        public function shortCutLink() {
-               if ($this->returnUrl == 'close.html' || !$this->getBackendUser()->mayMakeShortcut()) {
+               if ($this->returnUrl === 'sysext/backend/Resources/Private/Templates/Close.html' || !$this->getBackendUser()->mayMakeShortcut()) {
                        return '';
                }
                return $this->doc->makeShortcutIcon('returnUrl,edit,defVals,overrideVals,columnsOnly,returnNewPageId,editRegularContentFromId,noView', '', $this->MCONF['name'], 1);
@@ -1267,10 +1267,10 @@ class EditDocumentController {
         * @return string
         */
        public function openInNewWindowLink() {
-               if ($this->returnUrl == 'close.html') {
+               if ($this->returnUrl === 'sysext/backend/Resources/Private/Templates/Close.html') {
                        return '';
                }
-               $aOnClick = 'vHWin=window.open(' . GeneralUtility::quoteJSvalue(GeneralUtility::linkThisScript(array('returnUrl' => 'close.html'))) . ',' . GeneralUtility::quoteJSvalue(md5($this->R_URI)) . ',\'width=670,height=500,status=0,menubar=0,scrollbars=1,resizable=1\');vHWin.focus();return false;';
+               $aOnClick = 'vHWin=window.open(' . GeneralUtility::quoteJSvalue(GeneralUtility::linkThisScript(array('returnUrl' => 'sysext/backend/Resources/Private/Templates/Close.html'))) . ',' . GeneralUtility::quoteJSvalue(md5($this->R_URI)) . ',\'width=670,height=500,status=0,menubar=0,scrollbars=1,resizable=1\');vHWin.focus();return false;';
                return '<a href="#" onclick="' . htmlspecialchars($aOnClick) . '" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.openInNewWindow', TRUE) . '">' . IconUtility::getSpriteIcon('actions-window-open') . '</a>';
        }
 
diff --git a/typo3/sysext/backend/Resources/Private/Templates/Close.html b/typo3/sysext/backend/Resources/Private/Templates/Close.html
new file mode 100644 (file)
index 0000000..e5fbc77
--- /dev/null
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+       <head>
+               <!-- Close script, used in particular by FormEngine to close the current edit window -->
+               <!-- TYPO3 Script ID: typo3/sysext/backend/Resources/Private/Templates/close.html -->
+               <meta charset="utf-8" />
+               <title>Close</title>
+               <script type="text/javascript">
+                       self.close();
+                       window.opener.location.reload(true);
+               </script>
+       </head>
+       <body>
+       </body>
+</html>
\ No newline at end of file
index c44fbc5..5ec4eee 100644 (file)
@@ -285,7 +285,7 @@ class FrontendEditPanel {
         * @see editPanelLinkWrap()
         */
        protected function editPanelLinkWrap_doWrap($string, $url) {
-               $onclick = 'vHWin=window.open(' . GeneralUtility::quoteJSvalue($url . '&returnUrl=close.html') . ',\'FEquickEditWindow\',\'width=690,height=500,status=0,menubar=0,scrollbars=1,resizable=1\');vHWin.focus();return false;';
+               $onclick = 'vHWin=window.open(' . GeneralUtility::quoteJSvalue($url . '&returnUrl=sysext/backend/Resources/Private/Templates/Close.html') . ',\'FEquickEditWindow\',\'width=690,height=500,status=0,menubar=0,scrollbars=1,resizable=1\');vHWin.focus();return false;';
                return '<a href="#" onclick="' . htmlspecialchars($onclick) . '" class="frontEndEditIconLinks">' . $string . '</a>';
        }