From f7fce62edb529a674d6e1e3a8b76911f58036b32 Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 30 Apr 2010 13:47:31 +0000 Subject: [PATCH] Updated base and release selector -Added a popup delay of 0.25 secs git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18001 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_baseSelector.inc | 26 +++++++++++++++++++-- gosa-core/include/class_releaseSelector.inc | 23 +++++++++++------- 2 files changed, 38 insertions(+), 11 deletions(-) diff --git a/gosa-core/include/class_baseSelector.inc b/gosa-core/include/class_baseSelector.inc index c50493162..0b26ffe0b 100644 --- a/gosa-core/include/class_baseSelector.inc +++ b/gosa-core/include/class_baseSelector.inc @@ -148,8 +148,30 @@ class baseSelector { } $link= "onclick=\"\$('bs_rebase_".$this->pid."').value='".base64_encode($config->current['BASE'])."'; $('submit_tree_base_".$this->pid."').click();\""; - $this->tree= "pid."').hide()\" onfocus=\"\$('bs_".$this->pid."').hide()\" onmouseover=\"Element.clonePosition(\$('bs_".$this->pid."'), 'bs_input_".$this->pid."', {setHeight: false, setWidth: false, offsetTop:(Element.getHeight('bs_input_".$this->pid."'))}); - Element.show.delay(0.25,\$('bs_".$this->pid."'));\" onmouseout=\"rtimer= Element.hide.delay(0.25, 'bs_".$this->pid."')\" value=\"".preg_replace('/"/', '"',$this->pathMapping[$this->base])."\">"; + + + $this->tree= "pid}').hide(); \" + onfocus=\" \$('bs_{$this->pid}').hide(); \" + onmouseover=\" mouseIsStillOver = true; + function showIt() + { + if(mouseIsStillOver){ + \$('bs_".$this->pid."').show(); + } + }; + Element.clonePosition(\$('bs_".$this->pid."'), + 'bs_input_".$this->pid."', + {setHeight: false, setWidth: false, offsetTop:(Element.getHeight('bs_input_".$this->pid."'))}); + rtimer=showIt.delay(0.25); \" + + onmouseout=\" mouseIsStillOver=false; + rtimer=Element.hide.delay(0.25,'bs_".$this->pid."')\" + + value=\"".preg_replace('/"/','"',$this->pathMapping[$this->base])."\">"; + // Autocompleter $this->tree.= "
". diff --git a/gosa-core/include/class_releaseSelector.inc b/gosa-core/include/class_releaseSelector.inc index 17f0e7200..28f86dec8 100644 --- a/gosa-core/include/class_releaseSelector.inc +++ b/gosa-core/include/class_releaseSelector.inc @@ -151,27 +151,32 @@ class releaseSelector { $link= "onclick=\"\$('bs_rebase_".$this->pid."').value='".base64_encode($this->releaseBase)."'; $('submit_tree_base_".$this->pid."').click();\""; - $this->tree= "tree= "pid}').hide(); \" onfocus=\" \$('bs_{$this->pid}').hide(); \" - onmouseover=\" Element.clonePosition(\$('bs_".$this->pid."'), + onmouseover=\" mouseIsStillOver = true; + function showIt() + { + if(mouseIsStillOver){ + \$('bs_".$this->pid."').show(); + } + }; + Element.clonePosition(\$('bs_".$this->pid."'), 'bs_input_".$this->pid."', {setHeight: false, setWidth: false, offsetTop:(Element.getHeight('bs_input_".$this->pid."'))}); - \$('bs_".$this->pid."').show(); \" + rtimer=showIt.delay(0.25); \" - onmouseout=\" rtimer=Element.hide.delay(0.25,'bs_".$this->pid."')\" + onmouseout=\" mouseIsStillOver=false; + rtimer=Element.hide.delay(0.25,'bs_".$this->pid."')\" value=\"".preg_replace('/"/','"',$this->pathMapping[$this->base])."\">"; // Autocompleter $this->tree.= "
". "