--- typo3_src-4.0/typo3/sysext/cms/tslib/media/scripts/gmenu_layers.php 2006-04-07 02:18:29.000000000 +0200 +++ fileadmin/.site-templates/gmenu_layers_mod.php 2006-06-16 14:05:26.000000000 +0200 @@ -181,18 +180,38 @@ // 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).'");'; } } @@ -221,10 +240,9 @@ GL_getObjCss("Menu'.$this->WMid.$key.'").visibility = "hidden";'; $this->WMlastKey = 'Menu'.$this->WMid.$key; } - if (!$this->mconf['lockPosition_addSelf']) { - $this->WMy+=(strcmp($this->mconf['setFixedHeight'],'')?$this->mconf['setFixedHeight']:$this->I['val']['output_h'])+intval($this->mconf['lockPosition_adjust']); - $this->WMx+=(strcmp($this->mconf['setFixedWidth'],'')?$this->mconf['setFixedWidth']:$this->I['val']['output_w'])+intval($this->mconf['lockPosition_adjust']); + $this->WMy+=(strcmp($this->mconf['setFixedHeight'],'')?$this->mconf['setFixedHeight']:$this->I['val']['output_h'])+(($override_adjust>0)?$override_adjust:intval($this->mconf['lockPosition_adjust'])); + $this->WMx+=(strcmp($this->mconf['setFixedWidth'],'')?$this->mconf['setFixedWidth']:$this->I['val']['output_w'])+(($override_adjust>0)?$override_adjust:intval($this->mconf['lockPosition_adjust'])); } } $this->WMresult.=$this->I['theItem']; @@ -297,7 +314,8 @@ } 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";'; } @@ -428,7 +446,8 @@ $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.="
".implode($this->divLayers,chr(10)).chr(10)."
"; return parent::extProc_finish(); }