fixed bug 584: Changing language in user setup do not reload left frame (menu).
authorIngo Renner <ingo.renner@typo3.org>
Wed, 2 May 2007 14:55:24 +0000 (14:55 +0000)
committerIngo Renner <ingo.renner@typo3.org>
Wed, 2 May 2007 14:55:24 +0000 (14:55 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@2321 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/alt_menu.php
typo3/alt_shortcut.php
typo3/sysext/setup/mod/index.php

index 424f81e..8920d8d 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2007-05-02  Ingo Renner  <typo3@ingo-renner.com>
+
+       * fixed bug 584: Changing language in user setup do not reload left frame (menu).
+
 2007-05-02  Dmitry Dulepov  <dmitry@typo3.org>
 
        * Fixed: IRRE does not work with workspaces (fix only for CSV & foreign field cases)
index 2b3e959..5ac7510 100755 (executable)
@@ -32,7 +32,7 @@
  * XHTML-trans compliant
  *
  * @author     Kasper Skaarhoj <kasperYYYY@typo3.com>
- * @co-author Sebastian Kurfürst <sebastian@garbage-group.de>
+ * @co-author Sebastian Kurfuerst <sebastian@garbage-group.de>
  */
 /**
  * [CLASS/FUNCTION INDEX of SCRIPT]
@@ -73,7 +73,7 @@ require_once ('class.alt_menu_functions.inc');
  * Script Class for rendering the vertical menu in the left side of the backend frameset
  *
  * @author     Kasper Skaarhoj <kasperYYYY@typo3.com>
- * @co-author Sebastian Kurfürst <sebastian@garbage-group.de>
+ * @co-author Sebastian Kurfuerst <sebastian@garbage-group.de>
  * @package TYPO3
  * @subpackage core
  */
@@ -111,6 +111,11 @@ class SC_alt_menu {
                $TBE_TEMPLATE->docType='xhtml_trans';
                $TBE_TEMPLATE->divClass='vertical-menu';
                $TBE_TEMPLATE->bodyTagAdditions = 'onload="top.restoreHighlightedModuleMenuItem()"';
+               $TBE_TEMPLATE->JScodeArray[] = '
+               function refreshMenu() { 
+                       window.location.href = document.URL;
+               }
+';
                $this->content.=$TBE_TEMPLATE->startPage('Vertical Backend Menu');
                $backPath = $GLOBALS['BACK_PATH'];
 
index fd54c59..f88c3be 100755 (executable)
@@ -262,6 +262,9 @@ class SC_alt_shortcut {
                        function changeWorkspacePreview(newstate)       {       //
                                window.location.href="alt_shortcut.php?changeWorkspacePreview="+newstate;
                        }
+                       function refreshShortcuts() { 
+                               window.location.href = document.URL;
+                       }
 
                        ');
                $this->content.=$this->doc->startPage('Shortcut frame');
index faf059b..a34e1c4 100755 (executable)
@@ -95,6 +95,7 @@ class SC_mod_user_setup_index {
        var $content;
        var $overrideConf;
        var $OLD_BE_USER;
+       var $languageUpdate;
 
 
 
@@ -125,6 +126,10 @@ class SC_mod_user_setup_index {
 
                                // PUT SETTINGS into the ->uc array:
 
+                               // reload left frame when switching BE language
+                       if (isset($d['lang']) && ($d['lang'] != $BE_USER->uc['lang'])) {
+                               $this->languageUpdate = true;
+                       }
                                // Language
                        $BE_USER->uc['lang'] = $d['lang'];
 
@@ -247,7 +252,16 @@ class SC_mod_user_setup_index {
         * @return      void
         */
        function main() {
-               global $BE_USER,$LANG,$BACK_PATH,$TBE_MODULES;;
+               global $BE_USER,$LANG,$BACK_PATH,$TBE_MODULES;
+               
+               if ($this->languageUpdate) {
+                       $this->doc->JScode.= '<script language="javascript" type="text/javascript">
+       top.menu.refreshMenu();
+       if(top.shortcutFrame) {
+               top.shortcutFrame.refreshShortcuts();
+       }
+</script>';
+               }
 
                        // Start page:
                $this->doc->JScode.= '<script language="javascript" type="text/javascript" src="'.$BACK_PATH.'md5.js"></script>';