Project

General

Profile

Actions

Feature #15889

closed

Clean up inline javascript in menu_layers.php

Added by Clemens Riccabona about 18 years ago. Updated about 11 years ago.

Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2006-03-23
Due date:
% Done:

0%

Estimated time:
PHP Version:
4.3
Tags:
Complexity:
Sprint Focus:

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
  1. 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();
  1. schnapp #####

(issue imported from #M2970)


Files

gmenu_layers.php (20.8 KB) gmenu_layers.php Administrator Admin, 2006-03-23 16:56
tmenu_layers.php (20.6 KB) tmenu_layers.php Administrator Admin, 2010-10-27 18:28
gmenu_layers_v2.php (20.6 KB) gmenu_layers_v2.php Administrator Admin, 2010-10-27 18:29
2970.patch (4.86 KB) 2970.patch Administrator Admin, 2010-10-27 20:37

Related issues 3 (0 open3 closed)

Related to TYPO3 Core - Feature #17035: Approach and patch for removing all inline JavaScriptRejected2007-02-24

Actions
Related to TYPO3 Core - Feature #17003: Add the js openPic-function to core-jsClosed2007-02-17

Actions
Related to TYPO3 Core - Task #46358: Separate ext:statictemplates code from coreClosed2013-03-16

Actions
Actions

Also available in: Atom PDF