[open-ils-commits] r14094 - in tags/rel_1_6_0_0/Open-ILS/web: js/dojo/openils opac/skin/default/xml/rdetail (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Sep 22 14:02:38 EDT 2009
Author: miker
Date: 2009-09-22 14:02:33 -0400 (Tue, 22 Sep 2009)
New Revision: 14094
Modified:
tags/rel_1_6_0_0/Open-ILS/web/js/dojo/openils/BibTemplate.js
tags/rel_1_6_0_0/Open-ILS/web/opac/skin/default/xml/rdetail/rdetail_summary.xml
Log:
backporting r14089 and r14091: IE does not appreciate direct parent/child CSS selectors, so we will use the more generic descendant selector; improve the display of title data by providing a space between subfields (XML processors, particularly those rendering HTML, normalizes whitespace by default)
Modified: tags/rel_1_6_0_0/Open-ILS/web/js/dojo/openils/BibTemplate.js
===================================================================
--- tags/rel_1_6_0_0/Open-ILS/web/js/dojo/openils/BibTemplate.js 2009-09-22 18:00:13 UTC (rev 14093)
+++ tags/rel_1_6_0_0/Open-ILS/web/js/dojo/openils/BibTemplate.js 2009-09-22 18:02:33 UTC (rev 14094)
@@ -54,15 +54,10 @@
var joiner = slot.getAttribute('join') || ' ';
var slot_handler = dojo.map(
- dojo.query('script[type=opac/slot-format]', slot).orphan(),
- function(x){
- if(dojo.isIE) return x.innerHTML;
- return dojox.data.dom.textContent(x)
- }
- );
+ dojo.query( 'script[type=opac/slot-format]', slot ).orphan(),
+ function(x){ return dojox.data.dom.textContent(x) || x.innerHTML }
+ ).join('');
- slot_handler = slot_handler.join('');
-
if (slot_handler) slot_handler = new Function('item', slot_handler);
else slot_handler = new Function('item','return dojox.data.dom.textContent(item);');
Modified: tags/rel_1_6_0_0/Open-ILS/web/opac/skin/default/xml/rdetail/rdetail_summary.xml
===================================================================
--- tags/rel_1_6_0_0/Open-ILS/web/opac/skin/default/xml/rdetail/rdetail_summary.xml 2009-09-22 18:00:13 UTC (rev 14093)
+++ tags/rel_1_6_0_0/Open-ILS/web/opac/skin/default/xml/rdetail/rdetail_summary.xml 2009-09-22 18:02:33 UTC (rev 14094)
@@ -6,7 +6,7 @@
<tbody id='rdetail_details_tbody'>
<tr>
- <td id='rdetail_image_cell' rowspan='10'>
+ <td id='rdetail_image_cell' rowspan='30'>
<a id='rdetail_img_link'>
<img style='border: none;' id='rdetail_image'
onerror='
@@ -23,8 +23,16 @@
<td nowrap='nowrap' class='rdetail_desc'>&common.title;</td>
<!-- *** Example of how to use the openils.BibTemplate infrastructure to augment the stock
*** summary screen with more and/or different information. In this case, the raw MARC 245. -->
- <!-- <td type='opac/slot-data' query='datafield[tag=245]' class='rdetail_item' id='rdetail_title'> </td> -->
- <td class='rdetail_item' id='rdetail_title'> </td>
+ <td type='opac/slot-data' query='datafield[tag=245]' class='rdetail_item' id='rdetail_title'>
+ <script type='opac/slot-format'><![CDATA[
+ var out = '';
+ var list = dojo.query( 'subfield', item );
+ for (var i = 0; i < list.length; i++) {
+ out += dojox.data.dom.textContent(list[i]) + ' ';
+ }
+ return out;
+ ]]></script>
+ </td>
</tr>
<tr>
@@ -75,7 +83,6 @@
<!-- *** Example of how to use the openils.BibTemplate infrastructure to augment the stock
*** summary screen with complex information, such as new search links on subjects. -->
- <!--
<tr>
<td nowrap='nowrap' class='rdetail_desc'>Subjects</td>
<td type='opac/slot-data' query='datafield[tag=650]' class='rdetail_item'>
@@ -99,7 +106,6 @@
]]></script>
</td>
</tr>
- -->
<tr class='hide_me' id='rdetail_online_row'>
<!-- *** Example of how to use the openils.BibTemplate infrastructure to augment the stock
@@ -113,7 +119,7 @@
]]></script>
</span>
</td>
- <td class='rdetail_item' id='rdetail_online' type='opac/slot-data' query='volumes > volume > uris > uri' join=", ">
+ <td class='rdetail_item' id='rdetail_online' type='opac/slot-data' query='volumes volume uris uri' join=", ">
<script type='opac/slot-format'><![CDATA[
var link = '<a href="' + item.getAttribute('href') + '">' + item.getAttribute('label') + '</a>';
if (item.getAttribute('use_restriction'))
More information about the open-ils-commits
mailing list