From c98fb29efbf34ec03d7b80139976f0cfc5a0e963 Mon Sep 17 00:00:00 2001 From: chris Date: Thu, 28 Jul 2005 14:41:31 +0200 Subject: footnote fix: update to previous patch, corrects IE issues darcs-hash:20050728124131-50fdc-f5fd8977074ccabef6ea4606a7728f228bdc73b6.gz --- lib/scripts/script.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'lib/scripts') 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(//gi, ''); + footnote = footnote.replace(//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; } -- cgit v1.2.3