From 9a0d74f1ff6fc823f870430a620d7677754a8fbe Mon Sep 17 00:00:00 2001 From: dbs Date: Tue, 28 Sep 2010 03:08:48 +0000 Subject: [PATCH] Use quoted attribute values to make Firefox / XULRunner happier about dojo queries The unquoted values in BibTemplate and the OPAC detail template were generating mucho noise in the JavaScript console; this hushes it up nicely. git-svn-id: svn://svn.open-ils.org/ILS/trunk@18062 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/js/dojo/openils/BibTemplate.js | 14 +++++++------- .../web/opac/skin/default/xml/rdetail/rdetail_summary.xml | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Open-ILS/web/js/dojo/openils/BibTemplate.js b/Open-ILS/web/js/dojo/openils/BibTemplate.js index a8e47c8ddb..88e2bff868 100644 --- a/Open-ILS/web/js/dojo/openils/BibTemplate.js +++ b/Open-ILS/web/js/dojo/openils/BibTemplate.js @@ -66,7 +66,7 @@ if(!dojo._hasResource["openils.BibTemplate"]) { render : function() { - var all_slots = dojo.query('*[type^=opac/slot-data]', this.root); + var all_slots = dojo.query('*[type^="opac/slot-data"]', this.root); var default_datatype = this.default_datatype; var slots = {}; @@ -99,10 +99,10 @@ if(!dojo._hasResource["openils.BibTemplate"]) { var item_limit = parseInt(slot.getAttribute('limit')); var item_offset = parseInt(slot.getAttribute('offset')) || 0; - var pre_render_callbacks = dojo.query( '*[type=opac/call-back+pre-render]', slot ); - var post_render_callbacks = dojo.query( '*[type=opac/call-back+post-render]', slot ); - var pre_query_callbacks = dojo.query( '*[type=opac/call-back+pre-query]', slot ); - var post_query_callbacks = dojo.query( '*[type=opac/call-back+post-query]', slot ); + var pre_render_callbacks = dojo.query( '*[type="opac/call-back+pre-render"]', slot ); + var post_render_callbacks = dojo.query( '*[type="opac/call-back+post-render"]', slot ); + var pre_query_callbacks = dojo.query( '*[type="opac/call-back+pre-query"]', slot ); + var post_query_callbacks = dojo.query( '*[type="opac/call-back+post-query"]', slot ); // Do pre-query stuff dojo.forEach(pre_query_callbacks, function (cb) { @@ -139,7 +139,7 @@ if(!dojo._hasResource["openils.BibTemplate"]) { var template_value_count = 0; dojo.query( - '*[type=opac/template-value]', + '*[type="opac/template-value"]', slot ).orphan().forEach(function(x) { var name = x.getAttribute('name'); @@ -154,7 +154,7 @@ if(!dojo._hasResource["openils.BibTemplate"]) { if (template_value_count > 0) slot.innerHTML = dojo.string.substitute( unescape(slot.innerHTML), template_values ); } - var handler_node = dojo.query( '*[type=opac/slot-format]', slot )[0]; + var handler_node = dojo.query( '*[type="opac/slot-format"]', slot )[0]; if (handler_node) slot_handler = new Function('item_list', 'BT', 'slotXML', 'slot', 'item', dojox.xml.parser.textContent(handler_node) || handler_node.innerHTML); else slot_handler = new Function('item_list', 'BT', 'slotXML', 'slot', 'item','return dojox.xml.parser.textContent(item) || item.innerHTML;'); diff --git a/Open-ILS/web/opac/skin/default/xml/rdetail/rdetail_summary.xml b/Open-ILS/web/opac/skin/default/xml/rdetail/rdetail_summary.xml index 510dce6c48..b18ff47431 100644 --- a/Open-ILS/web/opac/skin/default/xml/rdetail/rdetail_summary.xml +++ b/Open-ILS/web/opac/skin/default/xml/rdetail/rdetail_summary.xml @@ -135,7 +135,7 @@ name="serial_holdings_label" class="result_table_title_cell hide_me" type="opac/slot-data" - query="datafield[tag=901] subfield[code=c]"> + query="datafield[tag='901'] subfield[code='c']"> Issues Held: ${holdingsStatement}