[open-ils-commits] r14298 - tags/rel_1_6_0_0/Open-ILS/web/opac/common/js (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Oct 7 16:24:56 EDT 2009
Author: erickson
Date: 2009-10-07 16:24:51 -0400 (Wed, 07 Oct 2009)
New Revision: 14298
Modified:
tags/rel_1_6_0_0/Open-ILS/web/opac/common/js/opac_utils.js
Log:
created workaround for confusing IE bug caused by titles with @'s, which resulted in URLs where the title should be
Modified: tags/rel_1_6_0_0/Open-ILS/web/opac/common/js/opac_utils.js
===================================================================
--- tags/rel_1_6_0_0/Open-ILS/web/opac/common/js/opac_utils.js 2009-10-07 20:24:22 UTC (rev 14297)
+++ tags/rel_1_6_0_0/Open-ILS/web/opac/common/js/opac_utils.js 2009-10-07 20:24:51 UTC (rev 14298)
@@ -473,7 +473,9 @@
args[PARAM_OFFSET] = 0;
args[PARAM_MRID] = rec.doc_id();
args[PARAM_RTYPE] = RTYPE_MRID;
+ var linkText = link.innerHTML; // IE
link.setAttribute("href", buildOPACLink(args));
+ link.innerHTML = linkText; // IE
}
function buildTitleDetailLink(rec, link) {
@@ -481,9 +483,13 @@
link.appendChild(text(normalize(truncate(rec.title(), 65))));
var args = {};
args.page = RDETAIL;
- //args[PARAM_OFFSET] = 0;
args[PARAM_RID] = rec.doc_id();
+ // in IE, if the link text contains a '@', it replaces the innerHTML text
+ // with the value of the href attribute. Wait, what? Yes. Capture the
+ // innerHTML and put it back into place after the href is set
+ var linkText = link.innerHTML; // IE
link.setAttribute("href", buildOPACLink(args));
+ link.innerHTML = linkText; // IE
}
/* 'type' is one of STYPE_AUTHOR, STYPE_SUBJECT, ... found in config.js
More information about the open-ils-commits
mailing list