[open-ils-commits] r18062 - in trunk/Open-ILS/web: js/dojo/openils opac/skin/default/xml/rdetail (dbs)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Sep 27 23:08:51 EDT 2010
Author: dbs
Date: 2010-09-27 23:08:48 -0400 (Mon, 27 Sep 2010)
New Revision: 18062
Modified:
trunk/Open-ILS/web/js/dojo/openils/BibTemplate.js
trunk/Open-ILS/web/opac/skin/default/xml/rdetail/rdetail_summary.xml
Log:
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.
Modified: trunk/Open-ILS/web/js/dojo/openils/BibTemplate.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/BibTemplate.js 2010-09-28 02:20:11 UTC (rev 18061)
+++ trunk/Open-ILS/web/js/dojo/openils/BibTemplate.js 2010-09-28 03:08:48 UTC (rev 18062)
@@ -66,7 +66,7 @@
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 @@
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 @@
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 (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;');
Modified: trunk/Open-ILS/web/opac/skin/default/xml/rdetail/rdetail_summary.xml
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/xml/rdetail/rdetail_summary.xml 2010-09-28 02:20:11 UTC (rev 18061)
+++ trunk/Open-ILS/web/opac/skin/default/xml/rdetail/rdetail_summary.xml 2010-09-28 03:08:48 UTC (rev 18062)
@@ -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']">
<td colspan="2">Issues Held: ${holdingsStatement}
<span class="hide_me" name="holdingsStatement" type="opac/template-value"><![CDATA[
if (fetchOrgSettingDefault(
More information about the open-ils-commits
mailing list