[!!!][TASK] Drop unused JavaScript from backend.js 24/50424/6
authorWouter Wolters <typo3@wouterwolters.nl>
Fri, 28 Oct 2016 19:10:58 +0000 (21:10 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Tue, 1 Nov 2016 10:31:12 +0000 (11:31 +0100)
Remove the following unused JavaScript methods from the core.

TYPO3._instances
TYPO3.addInstance
TYPO3.getInstance
TYPO3.helpers.split

Resolves: #78521
Releases: master
Change-Id: I244c80c9cb3081e43360d0d1b3a70346590a603f
Reviewed-on: https://review.typo3.org/50424
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/backend/Resources/Public/JavaScript/backend.js
typo3/sysext/core/Documentation/Changelog/master/Breaking-78521-DropUnusedJavaScriptFromBackendjs.rst [new file with mode: 0644]

index 37f01ec..fd5d818 100644 (file)
  * common storage and global object, could later hold more information about the current user etc.
  */
 var TYPO3 = TYPO3 || {};
-TYPO3 = Ext.apply(TYPO3, {
-       // store instances that only should be running once
-       _instances: {},
-       getInstance: function(className) {
-               return TYPO3._instances[className] || false;
-       },
-       addInstance: function(className, instance) {
-               TYPO3._instances[className] = instance;
-               return instance;
-       },
-
-       helpers: {
-               // creates an array by splitting a string into parts, taking a delimiter
-               split: function(str, delim) {
-                       var res = [];
-                       while (str.indexOf(delim) > 0) {
-                               res.push(str.substr(0, str.indexOf(delim)));
-                               str = str.substr(str.indexOf(delim) + delim.length);
-                       }
-                       return res;
-               }
-       }
-});
 
 /**
  * jump the backend to a module
diff --git a/typo3/sysext/core/Documentation/Changelog/master/Breaking-78521-DropUnusedJavaScriptFromBackendjs.rst b/typo3/sysext/core/Documentation/Changelog/master/Breaking-78521-DropUnusedJavaScriptFromBackendjs.rst
new file mode 100644 (file)
index 0000000..0471cf6
--- /dev/null
@@ -0,0 +1,32 @@
+.. include:: ../../Includes.txt
+
+=========================================================
+Breaking: #78521 - Drop unused JavaScript from backend.js
+=========================================================
+
+See :issue:`78521`
+
+Description
+===========
+
+The following JavaScript methods related to ExtJS have been removed from the Backend main frame
+as defined in the main `backend.js` file.
+
+:js:`TYPO3._instances`
+:js:`TYPO3.addInstance`
+:js:`TYPO3.getInstance`
+:js:`TYPO3.helpers.split`
+
+
+Impact
+======
+
+Any call to one of the above mentioned methods will result in a JavaScript error.
+
+
+Affected Installations
+======================
+
+Any installation that uses one of the methods mentioned above.
+
+.. index:: Backend, JavaScript