[TASK] Deprecate property iframe in TYPO3.Backend.ContentContainer 10/50210/6
authorFrank Naegler <frank.naegler@typo3.org>
Thu, 13 Oct 2016 09:12:58 +0000 (11:12 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Tue, 18 Oct 2016 14:17:18 +0000 (16:17 +0200)
Deprecate the property top.TYPO3.Backend.ContentContainer.iframe
and introduce an accessor method.

Resolves: #78279
Related: #78268
Releases: master
Change-Id: I821a6fc08978e9520ba131755dbbb67274994b8b
Reviewed-on: https://review.typo3.org/50210
Reviewed-by: Daniel Goerz <ervaude@gmail.com>
Tested-by: Daniel Goerz <ervaude@gmail.com>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/backend/Resources/Public/JavaScript/Viewport.js
typo3/sysext/core/Documentation/Changelog/master/Deprecation-78279-DeprecateTopTYPO3BackendContentContaineriframe.rst [new file with mode: 0644]
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/RteLinkBrowser.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/SelectImage.js

index fbf4bac..413c427 100644 (file)
@@ -113,7 +113,12 @@ define(
                         * Contentcontainer
                         */
                        ContentContainer: {
+                               // @deprecated since TYPO3 v8, will be removed in v9.
+                               // Use top.TYPO3.Backend.ContentContainer.get() instead of top.TYPO3.Backend.ContentContainer.iframe
                                'iframe': $('.t3js-scaffold-content-module-iframe')[0].contentWindow,
+                               get: function() {
+                                       return $('.t3js-scaffold-content-module-iframe')[0].contentWindow;
+                               },
                                setUrl: function (urlToLoad) {
                                        TYPO3.Backend.Loader.start();
                                        $('.t3js-scaffold-content-module-iframe')
diff --git a/typo3/sysext/core/Documentation/Changelog/master/Deprecation-78279-DeprecateTopTYPO3BackendContentContaineriframe.rst b/typo3/sysext/core/Documentation/Changelog/master/Deprecation-78279-DeprecateTopTYPO3BackendContentContaineriframe.rst
new file mode 100644 (file)
index 0000000..a848e2d
--- /dev/null
@@ -0,0 +1,30 @@
+.. include:: ../../Includes.txt
+
+=========================================================================
+Deprecation: #78279 - Deprecate top.TYPO3.Backend.ContentContainer.iframe
+=========================================================================
+
+See :forge:`78279`
+
+Description
+===========
+
+The property :js:`top.TYPO3.Backend.ContentContainer.iframe` has been deprecated.
+
+
+Impact
+======
+
+Usage of this property will stop work with TYPO3 v9
+
+
+Affected Installations
+======================
+
+All installations using :js:`top.TYPO3.Backend.ContentContainer.iframe`.
+
+
+Migration
+=========
+
+Use accessor method :js:`top.TYPO3.Backend.ContentContainer.get()` instead.
index 4a45181..a7d2a45 100644 (file)
@@ -67,8 +67,8 @@ define(['jquery', 'TYPO3/CMS/Recordlist/LinkBrowser'], function($, LinkBrowser)
         */
        RteLinkBrowser.initialize = function() {
                var callerWindow;
-               if (typeof top.TYPO3.Backend !== 'undefined' && typeof top.TYPO3.Backend.ContentContainer.iframe !== 'undefined') {
-                       callerWindow = top.TYPO3.Backend.ContentContainer.iframe;
+               if (typeof top.TYPO3.Backend !== 'undefined' && typeof top.TYPO3.Backend.ContentContainer.get() !== 'undefined') {
+                       callerWindow = top.TYPO3.Backend.ContentContainer.get();
                } else {
                        callerWindow = window.parent;
                }
index 5c75e08..2b5fd28 100644 (file)
@@ -30,8 +30,8 @@ define(['jquery', 'TYPO3/CMS/Recordlist/LinkBrowser'], function($, LinkBrowser)
 
                initialize: function() {
                        var callerWindow;
-                       if (typeof top.TYPO3.Backend !== 'undefined' && typeof top.TYPO3.Backend.ContentContainer.iframe !== 'undefined') {
-                               callerWindow = top.TYPO3.Backend.ContentContainer.iframe;
+                       if (typeof top.TYPO3.Backend !== 'undefined' && typeof top.TYPO3.Backend.ContentContainer.get() !== 'undefined') {
+                               callerWindow = top.TYPO3.Backend.ContentContainer.get();
                        } else {
                                callerWindow = window.parent;
                        }