From f0972d740925c56906e07228dac69c8ba0361328 Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Wed, 9 Dec 2009 11:58:19 +0000 Subject: [PATCH] fixing a bug regarding the selectBox resize with MSIE (all was no longer selectable) --- etemplate/js/etemplate.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/etemplate/js/etemplate.js b/etemplate/js/etemplate.js index a14e202991..2a9e5704e3 100644 --- a/etemplate/js/etemplate.js +++ b/etemplate/js/etemplate.js @@ -397,7 +397,7 @@ function dropdown_menu_hack(el) t = t.replace(/<\/option/gi,'])*">/gi,'$1'); + t = t.replace(/])*">/gi,'$1'); t = t.replace(/<\/optgroup>/gi,'---'); mb.innerHTML = t; //mb.innerHTML = "
gfgfg
"; @@ -411,11 +411,11 @@ function dropdown_menu_hack(el) //alert('Value:'+mb.options[i].value + ', Text:'+ mb.options[i].innerHTML); mb.options[i].selectedIndex = i; mb.options[i].style.cssText = "list-style:none;margin:0;padding:1px 2px;width/**/:100%;white-space:nowrap;" - if (mb.options[i].value != '') mb.options[i].style.cssText = mb.options[i].style.cssText + "cursor:hand;cursor:pointer;"; + if (mb.options[i].value != 'i-opt-group-lable-i') mb.options[i].style.cssText = mb.options[i].style.cssText + "cursor:hand;cursor:pointer;"; mb.options[i].title =mb.options[i].innerHTML; mb.options[i].innerHTML ="" + mb.options[i].innerHTML + ""; - if (mb.options[i].value == '') mb.options[i].innerHTML = ""+mb.options[i].innerHTML+""; - if (mb.options[i].value != '') mb.options[i].onmouseover = function() + if (mb.options[i].value == 'i-opt-group-lable-i') mb.options[i].innerHTML = ""+mb.options[i].innerHTML+""; + if (mb.options[i].value != 'i-opt-group-lable-i') mb.options[i].onmouseover = function() { if( mb.options.selected ) {mb.options.selected.style.background="white";mb.options.selected.style.color="black";} @@ -423,7 +423,7 @@ function dropdown_menu_hack(el) this.style.background="#333366";this.style.color="white"; } mb.options[i].onmouseout = function(){this.style.background="white";this.style.color="black";} - if (mb.options[i].value != '') + if (mb.options[i].value != 'i-opt-group-lable-i') { mb.options[i].onmousedown = function(){selectMenu(this); } mb.options[i].onkeydown = function(){selectMenu(this); }