diff options
| author | Rob Peters <makitso@gmail.com> | 2012-02-20 22:06:48 +0000 |
|---|---|---|
| committer | Rob Peters <makitso@gmail.com> | 2012-02-20 22:06:48 +0000 |
| commit | f1fee6445af52a7d93c376c901d81c764da4c4ef (patch) | |
| tree | eab69a641291a0f54a8984f68b9df79b6242d642 /js | |
| parent | 9096e2afefbc0c7bd650954d007506f80be248b6 (diff) | |
| download | webtrees-f1fee6445af52a7d93c376c901d81c764da4c4ef.tar.gz webtrees-f1fee6445af52a7d93c376c901d81c764da4c4ef.tar.bz2 webtrees-f1fee6445af52a7d93c376c901d81c764da4c4ef.zip | |
Chart zoom is failing in IE8 when the lightbox module is used. This fix to expandbox removes the error and IE8 now works. However, there is still some display garbage with compact charts and IE8 when using zoom.
Diffstat (limited to 'js')
| -rw-r--r-- | js/webtrees.js | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/js/webtrees.js b/js/webtrees.js index b1fdf61b87..4d0f42be5d 100644 --- a/js/webtrees.js +++ b/js/webtrees.js @@ -557,10 +557,11 @@ var oldname = 0; var oldthumbdisp = 0; var repositioned = 0; var oldiconsdislpay = 0; +var rv =null; function expandbox(boxid, bstyle) { if (big==1) { - if (document.getElementsByClassName) { // Check if browser supports the getElementByClassName function + if (!rv) { // true if not ie8 if (compact_count.length>0) { // True only if compact chart fontdef.style.display='none'; } @@ -568,9 +569,14 @@ function expandbox(boxid, bstyle) { restorebox(oldboxid, bstyle); if (boxid==oldboxid) return true; } - if (document.getElementsByClassName) { // Check if browser supports the getElementByClassName function + if (navigator.appName == 'Microsoft Internet Explorer') { + var ua = navigator.userAgent; + var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})"); + if (re.exec(ua) != null) + rv = parseFloat(RegExp.$1); + } + if (!rv) { // true if not IE8 compact_count = document.getElementsByClassName("compact_view"); - ie8=0; } url = window.location.toString(); |
