#15889Clean up inline javascript in menu_layers.php
Description
When using layermenus, you are confronted with crowds of inline javascripts. the solution is a small change within the two files gmenu_layers.php and tmenu_layers.php. would be nice to be integrated in the next releases.
following changes, gmenu_layers.php, from line 414 —> but its the same in tmenu_layers.php
#### schnipp #####
$GLOBALS[‘TSFE’]->JSeventFuncCalls[‘onload’][‘GL_initLayers()’]= ‘GL_initLayers();’;
$GLOBALS[‘TSFE’]->JSeventFuncCalls[‘onload’][$this->WMid]= ‘GL_restoreMenu(“’.$this->WMid.’”);’;
$GLOBALS[‘TSFE’]->JSeventFuncCalls[‘onmousemove’][‘GL_getMouse(e)’]= ‘GL_getMouse(e);’; // Should be called BEFORE any of the ‘local’ getMouse functions!
$GLOBALS[‘TSFE’]->JSeventFuncCalls[‘onmousemove’][$this->WMid]= ‘GL’.$this->WMid.’_getMouse(e);’;
$GLOBALS[‘TSFE’]->JSeventFuncCalls[‘onmouseup’][$this->WMid]= ‘GL_mouseUp(\’‘.$this->WMid.’\’,e);’;
$GLOBALS[‘TSFE’]->divSection.=implode($this->divLayers,chr(10)).chr(10);
/** The Changes **/
$GLOBALS[‘TSFE’]->additionalHeaderData[‘1tmenu_layers’] .= TSpagegen::inline2TempFile($this->_JSCode,‘js’);
if($GLOBALS[‘TSFE’]->JSImgCode != ‘’){
$GLOBALS[‘TSFE’]->additionalHeaderData[‘js_1tmenu_layers’].= TSpagegen::inline2TempFile($GLOBALS[‘TSFE’]->JSImgCode,‘js’);
$GLOBALS[‘TSFE’]->JSImgCode = ‘’;
}
return parent::extProc_finish();
#### schnapp #####
(issue imported from #M2970)
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.