[open-ils-commits] r14300 - branches/rel_1_4_0/Open-ILS/web/opac/common/js (erickson)

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Oct 7 16:26:16 EDT 2009


Author: erickson
Date: 2009-10-07 16:26:11 -0400 (Wed, 07 Oct 2009)
New Revision: 14300

Modified:
   branches/rel_1_4_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: branches/rel_1_4_0/Open-ILS/web/opac/common/js/opac_utils.js
===================================================================
--- branches/rel_1_4_0/Open-ILS/web/opac/common/js/opac_utils.js	2009-10-07 20:25:59 UTC (rev 14299)
+++ branches/rel_1_4_0/Open-ILS/web/opac/common/js/opac_utils.js	2009-10-07 20:26:11 UTC (rev 14300)
@@ -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