From: Gabriel Wicke Date: Mon, 19 Apr 2004 14:12:51 +0000 (+0000) Subject: ie textarea fixes X-Git-Tag: 1.3.0beta1~381 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/journal.php?a=commitdiff_plain;h=39c036408c5d286c2937ede714a5c189a0593610;p=lhc%2Fweb%2Fwiklou.git ie textarea fixes --- diff --git a/stylesheets/IEFixes.js b/stylesheets/IEFixes.js index 25991cc611..a9a7428c14 100644 --- a/stylesheets/IEFixes.js +++ b/stylesheets/IEFixes.js @@ -1,13 +1,20 @@ // IE fix javascript +var rslt = navigator.appVersion.match(/MSIE (\d+\.\d+)/, ''); +if (rslt != null ) var version = Number(rslt[1]); +else var version = 0; -// png alpha transparency fixes -window.attachEvent("onload", fixalpha); +window.attachEvent("onload", hookit); +function hookit() { + fixalpha(); + fixtextarea(); + var wrapper = document.getElementById('tawrapper'); + if(wrapper) wrapper.attachEvent("onclick", fixtextarea); +} +// png alpha transparency fixes function fixalpha(){ // bg - var rslt = navigator.appVersion.match(/MSIE (\d+\.\d+)/, ''); - if (rslt != null && Number(rslt[1]) >= 5.5) - { + if(version >= 5.5) { var logoa = document.getElementById('portlet-logo').firstChild; var bg = logoa.currentStyle.backgroundImage; if (bg.match(/\.png/i) != null){ @@ -35,3 +42,11 @@ function fixalpha(){ }*/ } } + +function fixtextarea() { + var wrapper = document.getElementById('tawrapper'); + if(wrapper) { + wrapper.style.width = 'auto'; + wrapper.style.width = (wrapper.offsetWidth - 4) + 'px'; + } +}