[TASK] Deprecate config.setJS_mouseOver and config.setJS_openPic 13/52213/3
authorBenni Mack <benni@typo3.org>
Tue, 28 Mar 2017 11:08:37 +0000 (13:08 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Tue, 28 Mar 2017 16:08:53 +0000 (18:08 +0200)
The TypoScript properties config.setJS_mouseOver and config.setJS_openPic
have been marked as deprecated.

Resolves: #80516
Releases: master
Change-Id: Ida5de8b3e873adfe7e27decf6e43813e7dc5cc2e
Reviewed-on: https://review.typo3.org/52213
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/core/Documentation/Changelog/master/Deprecation-80516-TypoScriptConfigsetJS_mouseOverAndConfigsetJS_openPic.rst [new file with mode: 0644]
typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php
typo3/sysext/frontend/Classes/Page/PageGenerator.php
typo3/sysext/t3editor/Resources/Private/tsref.xml
typo3/sysext/t3editor/Resources/Public/JavaScript/parse_typoscript/tokenizetyposcript.js

diff --git a/typo3/sysext/core/Documentation/Changelog/master/Deprecation-80516-TypoScriptConfigsetJS_mouseOverAndConfigsetJS_openPic.rst b/typo3/sysext/core/Documentation/Changelog/master/Deprecation-80516-TypoScriptConfigsetJS_mouseOverAndConfigsetJS_openPic.rst
new file mode 100644 (file)
index 0000000..66a17e6
--- /dev/null
@@ -0,0 +1,34 @@
+.. include:: ../../Includes.txt
+
+================================================================================
+Deprecation: #80516 - TypoScript config.setJS_mouseOver and config.setJS_openPic
+================================================================================
+
+See :issue:`80516`
+
+Description
+===========
+
+The TypoScript properties `config.setJS_mouseOver` and `config.setJS_openPic` have been marked
+as deprecated.
+
+
+Impact
+======
+
+Setting any of the TypoScript properties will trigger a deprecation log entry.
+
+
+Affected Installations
+======================
+
+Any installation using these TypoScript options.
+
+
+Migration
+=========
+
+Include the small JavaScript files directly in your custom JavaScript file or inline via
+`page.inlineJS`.
+
+.. index:: TypoScript
\ No newline at end of file
index 8a25201..5afbc40 100644 (file)
@@ -3238,9 +3238,17 @@ class TypoScriptFrontendController
         $GLOBALS['TYPO3_CONF_VARS']['GFX']['processor_allowUpscaling'] = (bool)(isset($this->config['config']['noScaleUp']) ? !$this->config['config']['noScaleUp'] : $GLOBALS['TYPO3_CONF_VARS']['GFX']['processor_allowUpscaling']);
         $this->ATagParams = trim($this->config['config']['ATagParams']) ? ' ' . trim($this->config['config']['ATagParams']) : '';
         if ($this->config['config']['setJS_mouseOver']) {
+            $this->logDeprecatedTyposcript(
+                'config.setJS_mouseOver',
+                'The TypoScript property "config.setJS_mouseOver" is deprecated since TYPO3 v8 and will be removed in TYPO3 v9. Please include the JavaScript snippet directly via TypoScript page.jsInline.'
+            );
             $this->setJS('mouseOver');
         }
         if ($this->config['config']['setJS_openPic']) {
+            $this->logDeprecatedTyposcript(
+                'config.setJS_openPic',
+                'The TypoScript property "config.setJS_openPic" is deprecated since TYPO3 v8 and will be removed in TYPO3 v9. Please include the JavaScript snippet directly via TypoScript page.jsInline.'
+            );
             $this->setJS('openPic');
         }
         $this->initializeSearchWordDataInTsfe();
index 311ca3a..f860b86 100644 (file)
@@ -112,9 +112,17 @@ class PageGenerator
         $GLOBALS['TYPO3_CONF_VARS']['GFX']['processor_allowUpscaling'] = (bool)(isset($tsfe->config['config']['noScaleUp']) ? !$tsfe->config['config']['noScaleUp'] : $GLOBALS['TYPO3_CONF_VARS']['GFX']['processor_allowUpscaling']);
         $tsfe->ATagParams = trim($tsfe->config['config']['ATagParams']) ? ' ' . trim($tsfe->config['config']['ATagParams']) : '';
         if ($tsfe->config['config']['setJS_mouseOver']) {
+            $tsfe->logDeprecatedTyposcript(
+                'config.setJS_mouseOver',
+                'The TypoScript property "config.setJS_mouseOver" is deprecated since TYPO3 v8 and will be removed in TYPO3 v9. Please include the JavaScript snippet directly via TypoScript page.jsInline.'
+            );
             $tsfe->setJS('mouseOver');
         }
         if ($tsfe->config['config']['setJS_openPic']) {
+            $tsfe->logDeprecatedTyposcript(
+                'config.setJS_openPic',
+                'The TypoScript property "config.setJS_openPic" is deprecated since TYPO3 v8 and will be removed in TYPO3 v9. Please include the JavaScript snippet directly via TypoScript page.jsInline.'
+            );
             $tsfe->setJS('openPic');
         }
         static::initializeSearchWordDataInTsfe();
index 0d5fe82..6fc1a26 100644 (file)
@@ -769,16 +769,6 @@ The background problem is this: In TYPO3 the same URL can show different content
 
 Another way to solve the problem is using this option in combination with disabling and enabling logins in various sections of the site. In the page records ("Advanced" page types) you can disable frontend user logins for branches of the page tree. Since many sites only needs the login in a certain branch of the page tree, disabling it in all other branches makes it much easier to use cache-headers in combination with logins; Cache-headers should simply be sent when logins are not allowed and never be send when logins are allowed! Then there will never be problems with logins and same-URLs.]]></description>
                        <default><![CDATA[
-]]></default>
-               </property>
-               <property name="setJS_mouseOver" type="boolean">
-                       <description><![CDATA[If set, the over() and out() JavaScript functions are forced to be included]]></description>
-                       <default><![CDATA[
-]]></default>
-               </property>
-               <property name="setJS_openPic" type="boolean">
-                       <description><![CDATA[If set, the openPic JavaScript function is forced to be included]]></description>
-                       <default><![CDATA[
 ]]></default>
                </property>
                <property name="spamProtectEmailAddresses" type="string">
index 60a4f11..4a99b8d 100644 (file)
@@ -781,8 +781,6 @@ var typoscriptWords = {
        'setContentToCurrent': 'reserved',
        'setCurrent': 'reserved',
        'setfixed': 'reserved',
-       'setJS_mouseOver': 'reserved',
-       'setJS_openPic': 'reserved',
        'setOnly': 'reserved',
        'setup': 'keyword2',
        'shadow': 'reserved',