Index: t3lib/config_default.php =================================================================== --- t3lib/config_default.php (revision 2932) +++ t3lib/config_default.php (working copy) @@ -174,7 +174,7 @@ 'AJAX' => array( // array of key-value pairs for a unified use of AJAX calls in the TYPO3 backend. Keys are the unique ajaxIDs where the value will be resolved to call a method in an object. See ajax.php and the classes/class.typo3ajax.php for more information. 'SC_alt_db_navframe::expandCollapse' => 'typo3/alt_db_navframe.php:SC_alt_db_navframe->ajaxExpandCollapse', 'SC_alt_file_navframe::expandCollapse' => 'typo3/alt_file_navframe.php:SC_alt_file_navframe->ajaxExpandCollapse', - 't3lib_TCEforms_inline::createNewRecord' => 't3lib/class.t3lib_tceforms_inline.php:t3lib_TCEforms_inline->processAjaxRequest', + 't3lib_TCEforms_inline::createNewRecord' => 't3lib/class.t3lib_tceforms_inline.php:t3lib_TCEforms_inline->processAjaxRequest', 't3lib_TCEforms_inline::setExpandedCollapsedState' => 't3lib/class.t3lib_tceforms_inline.php:t3lib_TCEforms_inline->processAjaxRequest', 'ShortcutMenu::getGroups' => 'typo3/classes/class.shortcutmenu.php:ShortcutMenu->getAjaxShortcutGroups', 'ShortcutMenu::saveShortcut' => 'typo3/classes/class.shortcutmenu.php:ShortcutMenu->setAjaxShortcut', @@ -180,7 +180,8 @@ 'ShortcutMenu::saveShortcut' => 'typo3/classes/class.shortcutmenu.php:ShortcutMenu->setAjaxShortcut', 'ShortcutMenu::render' => 'typo3/classes/class.shortcutmenu.php:ShortcutMenu->renderAjax', 'ShortcutMenu::delete' => 'typo3/classes/class.shortcutmenu.php:ShortcutMenu->deleteAjaxShortcut', - 'ShortcutMenu::create' => 'typo3/classes/class.shortcutmenu.php:ShortcutMenu->createAjaxShortcut' + 'ShortcutMenu::create' => 'typo3/classes/class.shortcutmenu.php:ShortcutMenu->createAjaxShortcut', + 'ModuleMenu::saveMenuState' => 'typo3/classes/class.modulemenu.php:ModuleMenu->saveMenuState' ), ), 'FE' => Array( // Configuration for the TypoScript frontend (FE). Nothing here relates to the administration backend! Index: typo3/classes/class.modulemenu.php =================================================================== --- typo3/classes/class.modulemenu.php (revision 2932) +++ typo3/classes/class.modulemenu.php (working copy) @@ -105,6 +105,21 @@ } /** + * saves the menu's toggle state in the backend user's uc + * + * @param array array of parameters from the AJAX interface, currently unused + * @param TYPO3AJAX object of type TYPO3AJAX + * @return void + */ + public function saveMenuState($params, &$ajaxObj) { + $menuItem = t3lib_div::_POST('menuid'); + $state = t3lib_div::_POST('state') === 'true' ? 1 : 0; + + $GLOBALS['BE_USER']->uc['moduleData']['menuState'][$menuItem] = $state; + $GLOBALS['BE_USER']->writeUC(); + } + + /** * renders the backend menu as unordered list * * @return string menu html code to use in the backend @@ -116,8 +131,9 @@ $rawModuleData = $this->getRawModuleData(); foreach($rawModuleData as $moduleKey => $moduleData) { + $menuState = $GLOBALS['BE_USER']->uc['moduleData']['menuState'][$moduleKey]; + $moduleLabel = $moduleData['title']; - $moduleLabel = $moduleData['title']; if($moduleData['link'] && $this->linkModules) { $moduleLabel = ''.$moduleLabel.''; } @@ -123,11 +139,11 @@ } //TODO make icon a background image using css - $menu .= '