[open-ils-commits] r18912 - trunk/Open-ILS/web/js/dojo/openils (senator)
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Dec 3 14:40:51 EST 2010
Author: senator
Date: 2010-12-03 14:40:47 -0500 (Fri, 03 Dec 2010)
New Revision: 18912
Modified:
trunk/Open-ILS/web/js/dojo/openils/BibTemplate.js
Log:
BibTemplate: make a couple of IE-friendly changes to BibTemplate.
Modified: trunk/Open-ILS/web/js/dojo/openils/BibTemplate.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/BibTemplate.js 2010-12-03 15:33:17 UTC (rev 18911)
+++ trunk/Open-ILS/web/js/dojo/openils/BibTemplate.js 2010-12-03 19:40:47 UTC (rev 18912)
@@ -60,8 +60,8 @@
textContent : function (node) {
if (node) {
- if (node instanceof HTMLElement) return node.innerText || node.textContent;
- return dojox.xml.parser.textContent(node);
+ return node.innerText || node.textContent ||
+ dojox.xml.parser.textContent(node) || "";
}
return '';
},
@@ -153,7 +153,15 @@
});
if (debug) alert('BibTemplate debug -- template values:\n' + dojo.toJson( template_values ));
- if (template_value_count > 0) slot.innerHTML = dojo.string.substitute( unescape(slot.innerHTML), template_values );
+ if (template_value_count > 0) {
+ dojo.attr(
+ slot, "innerHTML",
+ dojo.string.substitute(
+ unescape(slot.innerHTML),
+ template_values
+ )
+ );
+ }
}
var handler_node = dojo.query( '*[type="opac/slot-format"]', slot )[0];
@@ -165,7 +173,7 @@
if (templated) {
if (handler_node) handler_node.parentNode.replaceChild( dojo.doc.createTextNode( content ), handler_node );
} else {
- slot.innerHTML = content;
+ dojo.attr(slot, "innerHTML", content);
}
}
More information about the open-ils-commits
mailing list