[open-ils-commits] r19456 - branches/rel_2_1/Open-ILS/web/js/dojo/openils (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Feb 16 17:22:31 EST 2011
Author: miker
Date: 2011-02-16 17:22:25 -0500 (Wed, 16 Feb 2011)
New Revision: 19456
Modified:
branches/rel_2_1/Open-ILS/web/js/dojo/openils/BibTemplate.js
Log:
Patch based on work by Dan Wells to improve Opera BibTemplate support
Modified: branches/rel_2_1/Open-ILS/web/js/dojo/openils/BibTemplate.js
===================================================================
--- branches/rel_2_1/Open-ILS/web/js/dojo/openils/BibTemplate.js 2011-02-16 22:20:53 UTC (rev 19455)
+++ branches/rel_2_1/Open-ILS/web/js/dojo/openils/BibTemplate.js 2011-02-16 22:22:25 UTC (rev 19456)
@@ -112,9 +112,15 @@
try { (new Function( 'BT', 'slotXML', 'slot', unescape(cb.innerHTML) ))(BT,bib,slot) } catch (e) {/*meh*/}
});
+ var query = slot.getAttribute('query');
+ var xml_root = bib.documentElement || bib;
+
+ // Opera (as of 11.01) fails with quotes in queries
+ if (dojo.isOpera) query = query.replace(/"|'/g, '');
+
var item_list = dojo.query(
- slot.getAttribute('query'),
- bib
+ query,
+ xml_root // Make Opera work by querying from the root element
);
if (item_limit) {
More information about the open-ils-commits
mailing list