diff options
author | chris <chris@teacherscpd.co.uk> | 2005-07-28 14:41:31 +0200 |
---|---|---|
committer | chris <chris@teacherscpd.co.uk> | 2005-07-28 14:41:31 +0200 |
commit | c98fb29efbf34ec03d7b80139976f0cfc5a0e963 (patch) | |
tree | 574b24ae873eb64438f6feb534d4a912060f00ea | |
parent | a6d2d9fa1831e896d45fef6db1d4846a043a8387 (diff) | |
download | rpg-c98fb29efbf34ec03d7b80139976f0cfc5a0e963.tar.gz rpg-c98fb29efbf34ec03d7b80139976f0cfc5a0e963.tar.bz2 |
footnote fix: update to previous patch, corrects IE issues
darcs-hash:20050728124131-50fdc-f5fd8977074ccabef6ea4606a7728f228bdc73b6.gz
-rw-r--r-- | lib/scripts/script.js | 12 | ||||
-rw-r--r-- | lib/tpl/default/design.css | 6 |
2 files changed, 10 insertions, 8 deletions
diff --git a/lib/scripts/script.js b/lib/scripts/script.js index 58785dbde..8ee3c3805 100644 --- a/lib/scripts/script.js +++ b/lib/scripts/script.js @@ -484,20 +484,16 @@ function fnt(id, e, evt) { var footnote = new String (a.parentNode.innerHTML); // strip the leading footnote anchors and their comma separators - footnote = footnote.replace(/<a\s*href=\".*\#fnt\d+\".*?<\/a>/gi, ''); + footnote = footnote.replace(/<a\s.*?href=\".*\#fnt\d+\".*?<\/a>/gi, ''); footnote = footnote.replace(/^\s+(,\s+)+/,''); // prefix ids on any elements with "insitu-" to ensure they remain unique footnote = footnote.replace(/\bid=\"(.*?)\"/gi,'id="insitu-$1'); - - // create the DOM node, assign an id, a class and the footnote content - fnt = document.createElement("div"); - fnt.id = "insitu-fn"+id; - fnt.className = "insitu-footnote"; - fnt.innerHTML = footnote; + } else { + var footnote = new String(fnt.innerHTML); } // activate the tooltip - domTT_activate(e, evt, 'content', fnt, 'type', 'velcro'); + domTT_activate(e, evt, 'content', footnote, 'type', 'velcro', 'id', 'insitu-fn'+id, 'styleClass', 'insitu-footnote', 'maxWidth', document.body.offsetWidth*0.4); currentFootnote = id; } diff --git a/lib/tpl/default/design.css b/lib/tpl/default/design.css index af7998317..48453a736 100644 --- a/lib/tpl/default/design.css +++ b/lib/tpl/default/design.css @@ -576,6 +576,12 @@ div.insitu-footnote { background: #eef3f8; text-align: left; padding: 4px; + max-width: 40%; /* IE's width is handled in javascript */ +} + +/* overcome IE issue with one line code or file boxes which require h. scrolling */ +* html .insitu-footnote pre.code, * html .insitu-footnote pre.file { + padding-bottom: 18px; } /* --------------- search result formating --------------- */ |