[TASK] Use non-extjs labels for select tree 50/49550/3
authorBenni Mack <benni@typo3.org>
Tue, 23 Aug 2016 08:21:19 +0000 (10:21 +0200)
committerTymoteusz Motylewski <t.motylewski@gmail.com>
Tue, 23 Aug 2016 12:47:04 +0000 (14:47 +0200)
Removes the last dependencies of SelectTree to ExtJS

Resolves: #77597
Releases: master
Change-Id: Ia56254bba5939625039c46689f7a71739087a5cc
Reviewed-on: https://review.typo3.org/49550
Tested-by: Bamboo TYPO3com <info@typo3.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Tymoteusz Motylewski <t.motylewski@gmail.com>
Tested-by: Tymoteusz Motylewski <t.motylewski@gmail.com>
typo3/sysext/backend/Classes/Form/Element/SelectTreeElement.php
typo3/sysext/backend/Classes/Form/FormResultCompiler.php
typo3/sysext/backend/Resources/Public/JavaScript/FormEngine/Element/TreeToolbar.js

index 1e1e0fb..9b2b01a 100644 (file)
@@ -83,6 +83,10 @@ class SelectTreeElement extends AbstractFormElement
 
         $resultArray['html'] = implode(LF, $html);
 
+        // add necessary labels for tree header
+        if ($showHeader) {
+            $resultArray['additionalInlineLanguageLabelFiles'][] = 'EXT:lang/locallang_csh_corebe.xlf';
+        }
         $resultArray['requireJsModules']['selectTreeElement'] = 'TYPO3/CMS/Backend/FormEngine/Element/SelectTreeElement';
 
         return $resultArray;
index 75de9b5..d4cb215 100644 (file)
@@ -231,8 +231,6 @@ class FormResultCompiler
         }
         $pageRenderer->loadJquery();
         $pageRenderer->loadExtJS();
-        // Load tree stuff here
-        $pageRenderer->addInlineLanguageLabelFile('EXT:lang/locallang_csh_corebe.xlf', 'tcatree');
         $pageRenderer->addJsFile($backendRelPath . 'Resources/Public/JavaScript/notifications.js');
         $beUserAuth = $this->getBackendUserAuthentication();
 
index 5772514..87df1e9 100644 (file)
@@ -54,13 +54,13 @@ define(['jquery', 'TYPO3/CMS/Backend/Icons', 'TYPO3/CMS/Backend/FormEngine/Eleme
             '<div class="tree-toolbar btn-toolbar">'+
                 '<div class="input-group">' +
                     '<span class="input-group-addon input-group-icon filter"></span>' +
-                    '<input type="text" class="form-control search-input" placeholder="' + TYPO3.l10n.localize('tcatree.findItem') + '">' +
+                    '<input type="text" class="form-control search-input" placeholder="' + TYPO3.lang['tcatree.findItem'] + '">' +
                 '</div>' +
                 '<div class="btn-group">' +
-                    '<button type="button" class="btn btn-default expand-all-btn" title="' + TYPO3.l10n.localize('tcatree.expandAll') + '"></button>' +
+                    '<button type="button" class="btn btn-default expand-all-btn" title="' + TYPO3.lang['tcatree.expandAll'] + '"></button>' +
                 '</div>' +
                 '<div class="btn-group">' +
-                    '<button type="button" class="btn btn-default collapse-all-btn" title="' + TYPO3.l10n.localize('tcatree.collapseAll') + '"></button>' +
+                    '<button type="button" class="btn btn-default collapse-all-btn" title="' + TYPO3.lang['tcatree.collapseAll'] + '"></button>' +
                 '</div>' +
             '</div>'
         )