summaryrefslogtreecommitdiff
path: root/js/webtrees.js
diff options
context:
space:
mode:
authorRob Peters <makitso@gmail.com>2012-02-20 22:32:31 +0000
committerRob Peters <makitso@gmail.com>2012-02-20 22:32:31 +0000
commit2dce83c1da9245a598095cfb3ac5025686c10009 (patch)
tree26212524f5ee9f43b93f75fcf9ba93da7e23ef5c /js/webtrees.js
parentf1fee6445af52a7d93c376c901d81c764da4c4ef (diff)
downloadwebtrees-2dce83c1da9245a598095cfb3ac5025686c10009.tar.gz
webtrees-2dce83c1da9245a598095cfb3ac5025686c10009.tar.bz2
webtrees-2dce83c1da9245a598095cfb3ac5025686c10009.zip
Chart zoom is failing in IE8 when the lightbox module is used. This fix to expandbox removes the error and IE8 now works.
Diffstat (limited to 'js/webtrees.js')
-rw-r--r--js/webtrees.js23
1 files changed, 8 insertions, 15 deletions
diff --git a/js/webtrees.js b/js/webtrees.js
index 4d0f42be5d..ff92a6c5fb 100644
--- a/js/webtrees.js
+++ b/js/webtrees.js
@@ -561,24 +561,17 @@ var rv =null;
function expandbox(boxid, bstyle) {
if (big==1) {
- if (!rv) { // true if not ie8
- if (compact_count.length>0) { // True only if compact chart
- fontdef.style.display='none';
- }
- }
+ if (clength>0) { // True only if compact chart
+ fontdef.style.display='none';
+ }
restorebox(oldboxid, bstyle);
if (boxid==oldboxid) return true;
}
- 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");
- }
-
+
+ jQuery(document).ready(function() {
+ clength = jQuery(".compact_view").length;
+ });
+
url = window.location.toString();
divbox = document.getElementById("out-"+boxid);
inbox = document.getElementById("inout-"+boxid);