Follow-up to #16738: Add ExtDirect Stateprovider for ExtJs States also for backend
authorSteffen Kamper <info@sk-typo3.de>
Fri, 17 Dec 2010 22:55:34 +0000 (22:55 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Fri, 17 Dec 2010 22:55:34 +0000 (22:55 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@9844 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/backend.php

index deea5da..577814a 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -20,6 +20,7 @@
 
 2010-12-17  Steffen Kamper  <steffen@typo3.org>
 
+       * Follow-up to #16738: Add ExtDirect Stateprovider for ExtJs States also for backend
        * Fixed bug #14303: t3lib_compressor causes filemtime errors on files in fileadmin directory (Thanks to Rens Admiraal)
        * Fixed bug #16096 Bug: addToAllTCATypes after certain fields does not work anymore (Thanks to Jo Hasenau)
        * Fixed bug #14500: Bug: Unit test failures in t3lib_matchCondition_backend_testcase (Thanks to Oliver Klee)
index c39312a..870796e 100644 (file)
@@ -257,6 +257,21 @@ class TYPO3backend {
 
                $this->loadResourcesForRegisteredNavigationComponents();
 
+                       // add state provider
+               $GLOBALS['TBE_TEMPLATE']->setExtDirectStateProvider();
+               $states = $GLOBALS['BE_USER']->uc['BackendComponents']['States'];
+                       //save states in BE_USER->uc
+               $extOnReadyCode = '
+                       Ext.state.Manager.setProvider(new TYPO3.state.ExtDirectProvider({
+                               key: "BackendComponents.States"
+                       }));
+               ';
+               if ($states) {
+                   $extOnReadyCode .= 'Ext.state.Manager.getProvider().initState(' . $states . ');';
+               }
+               $this->pageRenderer->addExtOnReadyCode($extOnReadyCode);
+
+
                        // set document title:
                $title = ($GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']
                        ? $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'].' [TYPO3 '.TYPO3_version.']'