Bug #18290 » typo3_bug_7646_for_416_v3.patch
typo3/alt_main.php 2008-04-19 22:09:01.000000000 +0200 | ||
---|---|---|
$this->loadModules = t3lib_div::makeInstance('t3lib_loadModules');
|
||
$this->loadModules->load($TBE_MODULES);
|
||
// Instantiates thee menu object which will generate some JavaScript for the goToModule() JS function in this frameset.
|
||
// Instantiates the menu object which will generate some JavaScript for the goToModule() JS function in this frameset.
|
||
$this->alt_menuObj = t3lib_div::makeInstance('alt_menu_functions');
|
||
// Check for distances defined in the styles array:
|
||
... | ... | |
$newPageModule = trim($GLOBALS['BE_USER']->getTSConfigVal('options.overridePageModule'));
|
||
$pageModule = t3lib_BEfunc::isModuleSetInTBE_MODULES($newPageModule) ? $newPageModule : 'web_layout';
|
||
$menuFrameName = 'menu';
|
||
if ($GLOBALS['BE_USER']->uc['noMenuMode'] === 'icons') {
|
||
$menuFrameName = 'topmenuFrame';
|
||
}
|
||
$this->mainJScode='
|
||
/**
|
||
* Function similar to PHPs rawurlencode();
|
||
... | ... | |
}
|
||
/**
|
||
* Function used to switch switch module.
|
||
* Wrapper for the actual goToModule function in the menu frame
|
||
*/
|
||
var currentModuleLoaded = "";
|
||
function goToModule(modName,cMR_flag,addGetVars) { //
|
||
var additionalGetVariables = "";
|
||
if (addGetVars) additionalGetVariables = addGetVars;
|
||
var cMR = 0;
|
||
if (cMR_flag) cMR = 1;
|
||
currentModuleLoaded = modName;
|
||
switch(modName) {'.$goToModule_switch.'
|
||
if (top.'.$menuFrameName.' && top.'.$menuFrameName.'.goToModule) {
|
||
currentModuleLoaded = modName;
|
||
top.'.$menuFrameName.'.goToModule(modName, cMR_flag, addGetVars);
|
||
} else {
|
||
window.setTimeout(function() { top.goToModule(modName, cMR_flag, addGetVars); }, 500);
|
||
}
|
||
}
|
||
/**
|
||
* reloads the menu frame
|
||
*/
|
||
function refreshMenu() {
|
||
top.'.$menuFrameName.'.location.href = top.'.$menuFrameName.'.document.URL
|
||
}
|
||
/**
|
||
* Frameset Module object
|
||
*
|
||
* Used in main modules with a frameset for submodules to keep the ID between modules
|
||
... | ... | |
if ($module) {
|
||
$this->mainJScode.='
|
||
// open in module:
|
||
window.setTimeout("top.goToModule(\''.$module.'\',false,\''.$params.'\');",500);
|
||
top.goToModule(\''.$module.'\',false,\''.$params.'\');
|
||
';
|
||
}
|
||
}
|
typo3/alt_menu.php 2008-04-19 22:30:39.000000000 +0200 | ||
---|---|---|
// Internal, Static: GPvar
|
||
var $_clearCacheFiles;
|
||
var $alt_menuObj; // Menu functions object.
|
||
/**
|
||
* Initialize
|
||
... | ... | |
* @return void
|
||
*/
|
||
function init() {
|
||
global $TBE_MODULES;
|
||
global $TBE_MODULES, $TBE_TEMPLATE;
|
||
// Setting GPvars:
|
||
$this->_clearCacheFiles = t3lib_div::_GP('_clearCacheFiles');
|
||
... | ... | |
$this->loadModules = t3lib_div::makeInstance('t3lib_loadModules');
|
||
$this->loadModules->observeWorkspaces = TRUE;
|
||
$this->loadModules->load($TBE_MODULES);
|
||
// Instantiates the menu object which will generate some JavaScript for the goToModule() JS function in this frame.
|
||
$this->alt_menuObj = t3lib_div::makeInstance('alt_menu_functions');
|
||
$TBE_TEMPLATE->JScodeArray[] = $this->alt_menuObj->generateMenuJScode($this->loadModules->modules);
|
||
}
|
||
/**
|
||
... | ... | |
$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'];
|
||
typo3/class.alt_menu_functions.inc 2008-04-19 22:34:52.000000000 +0200 | ||
---|---|---|
return $link.'?';
|
||
} else return $link;
|
||
}
|
||
/**
|
||
* Generates some JavaScript code for the frame.
|
||
*
|
||
* @return string goToModule javascript function
|
||
*/
|
||
function generateMenuJScode($loadedModules, $menuType = 4) {
|
||
global $TBE_TEMPLATE;
|
||
|
||
$goToModuleSwitch = $this->topMenu($loadedModules, 0, '', $menuType);
|
||
$jsCode = '
|
||
/**
|
||
* Function used to switch switch module.
|
||
*/
|
||
var currentModuleLoaded = "";
|
||
function goToModule(modName,cMR_flag,addGetVars) { //
|
||
var additionalGetVariables = "";
|
||
if (addGetVars) additionalGetVariables = addGetVars;
|
||
var cMR = 0;
|
||
if (cMR_flag) cMR = 1;
|
||
currentModuleLoaded = modName;
|
||
switch(modName) {'.$goToModuleSwitch.'
|
||
}
|
||
}';
|
||
return $jsCode;
|
||
}
|
||
}
|
||
-- typo3_416/alt_menu_sel.php 2008-03-03 21:24:35.000000000 +0100
|
||
++ typo3/alt_menu_sel.php 2008-04-23 12:15:54.000000000 +0200
|
||
... | ... | |
$TBE_TEMPLATE->form = '<form action="">';
|
||
$TBE_TEMPLATE->docType = 'xhtml_trans';
|
||
// add menu JS
|
||
$alt_menuObj = t3lib_div::makeInstance('alt_menu_functions');
|
||
$TBE_TEMPLATE->JScodeArray[] = $alt_menuObj->generateMenuJScode($loadModules->modules);
|
||
$this->content.=$TBE_TEMPLATE->startPage('Selector box menu');
|
||
// Make menu and add it:
|
||
$alt_menuObj = t3lib_div::makeInstance('alt_menu_functions');
|
||
$this->content.=$alt_menuObj->topMenu($loadModules->modules,0,'',2);
|
||
// End page:
|
||
-- typo3_416/alt_topmenu_dummy.php 2008-03-03 21:24:35.000000000 +0100
|
||
++ typo3/alt_topmenu_dummy.php 2008-05-05 15:03:50.000000000 +0200
|
||
... | ... | |
// Start page
|
||
$TBE_TEMPLATE->docType = 'xhtml_trans';
|
||
$TBE_TEMPLATE->bodyTagId.= '-iconmenu';
|
||
$TBE_TEMPLATE->JScodeArray[] = $alt_menuObj->generateMenuJScode($loadModules->modules);
|
||
$this->content.=$TBE_TEMPLATE->startPage('Top frame icon menu');
|
||
if ($iconMenuMode) {
|