[CLEANUP] Remove supersuperold JS file 19/34219/2
authorBenjamin Mack <benni@typo3.org>
Sat, 15 Nov 2014 18:18:08 +0000 (19:18 +0100)
committerOliver Hader <oliver.hader@typo3.org>
Sat, 15 Nov 2014 19:14:10 +0000 (20:14 +0100)
There is a file in typo3/js/jsfunc.updateform.js
which was used before all fe_admin was
removed from core, but missed from removal
with fe_admin completely.

Same goes for the call in ContentObjectRenderer
which is not used in the core for several versions.

As this can not work, and is superfluous, the file
and the method (note: @access private) can
be safely removed.

Releases: master
Resolves: #62996
Change-Id: I8f30d6d6ca317c616e05aa6ee88efb73adc15033
Reviewed-on: http://review.typo3.org/34219
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Tested-by: Oliver Hader <oliver.hader@typo3.org>
typo3/js/jsfunc.updateform.js [deleted file]
typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php

diff --git a/typo3/js/jsfunc.updateform.js b/typo3/js/jsfunc.updateform.js
deleted file mode 100644 (file)
index abc7f2e..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Universal formupdate-function
- *
- * @param formname
- * @param fieldname
- * @param value
- */
-function updateForm(formname,fieldname,value) {
-       if (document[formname] && document[formname][fieldname]) {
-               var fObj = document[formname][fieldname];
-               var type=fObj.type;
-               if (!fObj.type) {
-                       type="radio";
-               }
-               switch(type) {
-                       case "text":
-                       case "textarea":
-                       case "hidden":
-                       case "password":
-                               fObj.value = value;
-                       break;
-                       case "checkbox":
-                               fObj.checked = ((value && value!=0) ? "on":"");
-                       break;
-                       case "select-one":
-                               var l=fObj.length;
-                               for (a=0;a<l;a++) {
-                                       if (fObj.options[a].value == value) {
-                                               fObj.selectedIndex = a;
-                                       }
-                               }
-                       break;
-                       case "select-multiple":
-                               var l=fObj.length;
-                               for (a=0;a<l;a++) {
-                                       if (fObj.options[a].value == value) {
-                                               fObj.options[a].selected = 1;
-                                       }
-                               }
-                       break;
-                       case "radio":
-                               var l=fObj.length;
-                               for (a=0; a<l;a++) {
-                                       if (fObj[a].value==value) {
-                                               fObj[a].checked = 1;
-                                       }
-                               }
-                       break;
-                       default:
-               }
-       }
-}
index bf9a0e4..eeea1a0 100644 (file)
@@ -7069,42 +7069,6 @@ class ContentObjectRenderer {
        }
 
        /**
-        * Returns a JavaScript <script> section with some function calls to JavaScript functions from "typo3/js/jsfunc.updateform.js" (which is also included by setting a reference in $GLOBALS['TSFE']->additionalHeaderData['JSincludeFormupdate'])
-        * The JavaScript codes simply transfers content into form fields of a form which is probably used for editing information by frontend users. Used by fe_adminLib.inc.
-        *
-        * @param array $dataArray Data array which values to load into the form fields from $formName (only field names found in $fieldList)
-        * @param string $formName The form name
-        * @param string $arrPrefix A prefix for the data array
-        * @param string $fieldList The list of fields which are loaded
-        * @return string
-        * @access private
-        * @see user_feAdmin::displayCreateScreen()
-        */
-       public function getUpdateJS($dataArray, $formName, $arrPrefix, $fieldList) {
-               $JSPart = '';
-               $updateValues = GeneralUtility::trimExplode(',', $fieldList);
-               foreach ($updateValues as $fKey) {
-                       $value = $dataArray[$fKey];
-                       if (is_array($value)) {
-                               foreach ($value as $Nvalue) {
-                                       $JSPart .= '
-       updateForm(\'' . $formName . '\',\'' . $arrPrefix . '[' . $fKey . '][]\',' . GeneralUtility::quoteJSvalue($Nvalue, TRUE) . ');';
-                               }
-                       } else {
-                               $JSPart .= '
-       updateForm(\'' . $formName . '\',\'' . $arrPrefix . '[' . $fKey . ']\',' . GeneralUtility::quoteJSvalue($value, TRUE) . ');';
-                       }
-               }
-               $JSPart = '<script type="text/javascript">
-       /*<![CDATA[*/ ' . $JSPart . '
-       /*]]>*/
-</script>
-';
-               $GLOBALS['TSFE']->additionalHeaderData['JSincludeFormupdate'] = '<script type="text/javascript" src="' . GeneralUtility::createVersionNumberedFilename(($GLOBALS['TSFE']->absRefPrefix . 'typo3/js/jsfunc.updateform.js')) . '"></script>';
-               return $JSPart;
-       }
-
-       /**
         * Includes resources if the config property 'includeLibs' is set.
         *
         * @param array $config TypoScript configuration