Project

General

Profile

Feature #16249 » gmenu_layers_corrected.php.diff

Administrator Admin, 2006-06-16 14:51

View differences:

fileadmin/.site-templates/gmenu_layers_mod.php 2006-06-16 14:48:52.000000000 +0200
// Added 120802; This means that everytime leaving a menuitem the layer should be shut down (and if the layer is hit in the meantime it is not though).
// This should happen only for items that are auto-hidden when not over and possibly only when a hide-timer is set. Problem is if the hide-timer is not set and we leave the main element, then the layer will be hidden unless we reach the layer before the timeout will happen and the menu hidden.
if (t3lib_div::intInRange($this->mconf['hideMenuWhenNotOver'],0,600) && $this->mconf['hideMenuTimer']) {
$event.='GL_resetAll("'.$this->WMid.'");';
/* Ralf Hettinger: Quickfix since this doesn't work with Konqueror (layers will always be collapsed and can't be reached). */
// check again for client info
$thisClient = t3lib_div::clientInfo();
if ($thisClient['BROWSER'] != 'konqu') {
$event.='GL_resetAll(\''.$this->WMid.'\');';
}
}
$this->I['linkHREF']['onMouseout'].=$event;
} else {
$this->I['linkHREF']['onMouseover'] = 'GL_hideAll("'.$this->WMid.'");'.$this->I['linkHREF']['onMouseover'];
// IESelectFix - Hides IFRAME layer below menu
if ($this->mconf['ieSelectFix']) $this->I['linkHREF']['onMouseover'] = $this->I['linkHREF']['onMouseover'].'GL_iframer(\''.$this->WMid.'\',\'\',false);';
$event='GL_resetAll("'.$this->WMid.'");';
/* Ralf Hettinger: Quickfix since this doesn't work with Konqueror (layers will always be collapsed and can't be reached). */
// check again for client info
$thisClient = t3lib_div::clientInfo();
if ($thisClient['BROWSER'] != 'konqu') {
$event='GL_resetAll(\''.$this->WMid.'\');';
}
$this->I['linkHREF']['onMouseout'].=$event;
}
$this->WMxyArray[] = 'GLV_menuXY["'.$this->WMid.'"]["Menu'.$this->WMid.$key.'"] = new Array('.$this->WMx.','.$this->WMy.',"itemID'.t3lib_div::shortmd5($this->I['uid'].'-'.$this->WMid).'","anchorID'.t3lib_div::shortmd5($this->I['uid'].'-'.$this->WMid).'");';
/* Ralf Hettinger: individual lock position adjustment */
$override_WMx = 0;
$override_WMy = 0;
if (is_array($this->mconf['lockPosition_adjust.']) && intval($this->mconf['lockPosition_adjust.'][$this->I['uid']])!=0) {
if (trim($this->mconf['lockPosition'])=='x') {
$override_WMx = $this->WMx+intval($this->mconf['lockPosition_adjust.'][$this->I['uid']]);
} elseif(trim($this->mconf['lockPosition'])=='y') {
$override_WMy = $this->WMy+intval($this->mconf['lockPosition_adjust.'][$this->I['uid']]);
}
}
$this->WMxyArray[] = 'GLV_menuXY["'.$this->WMid.'"]["Menu'.$this->WMid.$key.'"] = new Array('.(($override_WMx)?$override_WMx:$this->WMx).','.(($override_WMy)?$override_WMy:$this->WMy).',"itemID'.t3lib_div::shortmd5($this->I['uid'].'-'.$this->WMid).'","anchorID'.t3lib_div::shortmd5($this->I['uid'].'-'.$this->WMid).'");';
}
}
......
} else {
// X position (y is fixed)
if (!strcmp($this->mconf['lockPosition'],'x')) {
$DoTop[]='GLV_menuOn["'.$this->WMid.'"].left = ('.$relCode['X'].'GLV_menuXY["'.$this->WMid.'"][id][0]-('.intval($this->mconf['xPosOffset']).')'.$dirL.')+"px";';
/* Ralf Hettinger: changing 'left' to 'marginLeft' property works in more complex layouts as well */
$DoTop[]='GLV_menuOn["'.$this->WMid.'"].marginLeft = ('.$relCode['X'].'GLV_menuXY["'.$this->WMid.'"][id][0]-('.intval($this->mconf['xPosOffset']).')'.$dirL.')+"px";';
if ($this->isSetIntval($this->mconf['topOffset'])) {
$DoTop[]='GLV_menuOn["'.$this->WMid.'"].top = ('.$relCode['Y'].intval($this->mconf['topOffset']).$dirU.')+"px";';
}
......
$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);
/* Ralf Hettinger: these div-wrapping allow easy positioning eg for centered layouts */
$GLOBALS['TSFE']->divSection.="<div id=\"gmenu_layers_layerScopeBody\"><div id=\"gmenu_layers_layerScope1\"><div id=\"gmenu_layers_layerScope2\">".implode($this->divLayers,chr(10)).chr(10)."</div></div></div>";
return parent::extProc_finish();
}
(2-2/2)