Fixed bug #11562: Main module does not load different navFrames in submodules
authorChristian Kuhn <lolli@schwarzbu.ch>
Fri, 26 Feb 2010 18:55:05 +0000 (18:55 +0000)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 26 Feb 2010 18:55:05 +0000 (18:55 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@7061 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/classes/class.modulemenu.php

index c7d77df..4b993d3 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
 2010-02-26  Christian Kuhn  <lolli@schwarzbu.ch>
 
+       * Fixed bug #11562: Main module does not load different navFrames in submodules (Thanks to Erik Frister)
        * Follow-up to #13675: Added testcase for t3lib_div::intExplode()
        * Follow-up to #13675: Use array_map() instead of array_walk()
        * Fixed bug #13675: Performance improvement: Use array_walk() for t3lib_div::intExplode (Thanks to Georg Ringer)
index dae6fc7..d4603f7 100644 (file)
@@ -452,6 +452,12 @@ class ModuleMenu {
                                top.currentSubScript = "'.$subModuleData['originalLink'].'";
                                if (top.content.list_frame && top.fsMod.currentMainLoaded == mainModName) {
                                        modScriptURL = "'.$this->appendQuestionmarkToLink($subModuleData['originalLink']).'"'.$additionalJavascript.';
+                                       ';
+                                                               // Change link to navigation frame if submodule has it's own navigation
+                                                       if ($submoduleNavigationFrameScript) {
+                                                               $javascriptCommand .= 'navFrames["' . $parentModuleName . '"] = "'. $submoduleNavigationFrameScript . '";';
+                                                       }
+                                                       $javascriptCommand .= '
                                } else if (top.nextLoadModuleUrl) {
                                        modScriptURL = "'.($subModuleData['prefix'] ? $this->appendQuestionmarkToLink($subModuleData['link']) . '&exScript=' : '') . 'listframe_loader.php";
                                } else {
@@ -480,20 +486,25 @@ class ModuleMenu {
                var additionalGetVariables = "";
                if (addGetVars) {
                        additionalGetVariables = addGetVars;
+               }';
+
+               $javascriptCode .= '
+               var navFrames = {};';
+               foreach ($navFrameScripts as $mainMod => $frameScript) {
+                       $javascriptCode .= '
+                               navFrames["'.$mainMod.'"] = "'.$frameScript.'";';
                }
 
+               $javascriptCode .= '
+
                var cMR = (cMR_flag ? 1 : 0);
                var modScriptURL = "";
 
                switch(modName) {'
                        ."\n".implode("\n", $moduleJavascriptCommands)."\n".'
                }
+               ';
 
-               var navFrames = {};';
-               foreach ($navFrameScripts as $mainMod => $frameScript) {
-                       $javascriptCode .= '
-               navFrames["'.$mainMod.'"] = "'.$frameScript.'";';
-               }
                $javascriptCode .= '
 
                if (!useCondensedMode && navFrames[mainModName]) {