[open-ils-commits] r1386 - conifer/branches/rel_2_0/web/opac/skin/uwin/xml/rdetail (dbs)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Apr 18 15:53:49 EDT 2011
Author: dbs
Date: 2011-04-18 15:53:44 -0400 (Mon, 18 Apr 2011)
New Revision: 1386
Modified:
conifer/branches/rel_2_0/web/opac/skin/uwin/xml/rdetail/rdetail_summary.xml
Log:
Switch to BT.textContent() and standard subjectMe() for uwin skin
We can adopt the more verbose subjectMe() variant later; this one works.
Modified: conifer/branches/rel_2_0/web/opac/skin/uwin/xml/rdetail/rdetail_summary.xml
===================================================================
--- conifer/branches/rel_2_0/web/opac/skin/uwin/xml/rdetail/rdetail_summary.xml 2011-04-18 19:33:22 UTC (rev 1385)
+++ conifer/branches/rel_2_0/web/opac/skin/uwin/xml/rdetail/rdetail_summary.xml 2011-04-18 19:53:44 UTC (rev 1386)
@@ -29,7 +29,7 @@
<td nowrap='nowrap' class='rdetail_desc'>&common.title;</td>
<td type='opac/slot-data' query='datafield[tag=245]' class='rdetail_item'>
<script type='opac/slot-format'><![CDATA[
- var rdetail_bib_title = dojox.data.dom.textContent(item);
+ var rdetail_bib_title = BT.textContent(item);
var title_node = dojo.query('head title');
dojo.addOnLoad(function() {dojo.place('<title>' + rdetail_bib_title + '</title>', title_node[0], 'replace');});
return '<span>' + rdetail_bib_title + '</span><br/>';
@@ -42,7 +42,7 @@
<td type='opac/slot-data' query='datafield[tag=246] subfield[code=a]' class='rdetail_item'>
<script type='opac/slot-format'><![CDATA[
dojo.query('#tag246').removeClass('hide_me');
- return '<span>' + dojox.data.dom.textContent(item) + '</span><br/>';
+ return '<span>' + BT.textContent(item) + '</span><br/>';
]]></script>
</td>
</tr>
@@ -57,7 +57,7 @@
<td type='opac/slot-data' query='datafield[tag=100]' class='rdetail_item'>
<script type='opac/slot-format'><![CDATA[
dojo.query('#tag100').removeClass('hide_me');
- return '<span>' + dojox.data.dom.textContent(item) + '</span><br/>';
+ return '<span>' + BT.textContent(item) + '</span><br/>';
]]></script>
</td>
</tr>
@@ -66,7 +66,7 @@
<td type='opac/slot-data' query='datafield[tag=110]' class='rdetail_item'>
<script type='opac/slot-format'><![CDATA[
dojo.query('#tag110').removeClass('hide_me');
- return '<span>' + dojox.data.dom.textContent(item) + '</span><br/>';
+ return '<span>' + BT.textContent(item) + '</span><br/>';
]]></script>
</td>
</tr>
@@ -75,7 +75,7 @@
<td type='opac/slot-data' query='datafield[tag=111]' class='rdetail_item'>
<script type='opac/slot-format'><![CDATA[
dojo.query('#tag111').removeClass('hide_me');
- return '<span>' + dojox.data.dom.textContent(item) + '</span><br/>';
+ return '<span>' + BT.textContent(item) + '</span><br/>';
]]></script>
</td>
</tr>
@@ -84,7 +84,7 @@
<td type='opac/slot-data' query='datafield[tag=020]' class='rdetail_item'>
<script type='opac/slot-format'><![CDATA[
dojo.query('#tag020').removeClass('hide_me');
- return '<span>' + dojox.data.dom.textContent(item) + '</span><br/>';
+ return '<span>' + BT.textContent(item) + '</span><br/>';
]]></script>
</td>
@@ -94,7 +94,7 @@
<td type='opac/slot-data' query='datafield[tag=022]' class='rdetail_ite' id='rdetail_issn'>
<script type='opac/slot-format'><![CDATA[
dojo.query('#tag022').removeClass('hide_me');
- var issn_raw = dojo.trim(dojox.data.dom.textContent(item));
+ var issn_raw = dojo.trim(BT.textContent(item));
// textContent returns multiple subfields concatenated with linefeeds,
// so our regex needs to match against linefeeds. "." does not match
@@ -138,7 +138,7 @@
<td type='opac/slot-data' query='datafield[tag=250]' class='rdetail_item'>
<script type='opac/slot-format'><![CDATA[
dojo.query('#tag250').removeClass('hide_me');
- return '<span>' + dojox.data.dom.textContent(item) + '</span><br/>';
+ return '<span>' + BT.textContent(item) + '</span><br/>';
]]></script>
</td>
</tr>
@@ -153,7 +153,7 @@
<td type='opac/slot-data' query='datafield[tag=260]' class='rdetail_item'>
<script type='opac/slot-format'><![CDATA[
dojo.query('#tag260').removeClass('hide_me');
- return '<span>' + dojox.data.dom.textContent(item) + '</span><br/>';
+ return '<span>' + BT.textContent(item) + '</span><br/>';
]]></script>
</td>
</tr>
@@ -177,7 +177,7 @@
<td type='opac/slot-data' query='datafield[tag=520]' class='rdetail_item'>
<script type='opac/slot-format'><![CDATA[
dojo.query('#tag520').removeClass('hide_me');
- return '<span>' + dojox.data.dom.textContent(item) + '</span><br/>';
+ return '<span>' + BT.textContent(item) + '</span><br/>';
]]></script>
</td>
@@ -303,7 +303,7 @@
<td type='opac/slot-data' query='datafield[tag=500]' class='rdetail_item'>
<script type='opac/slot-format'><![CDATA[
dojo.query('#tag500').removeClass('hide_me');
- return '<span>' + dojox.data.dom.textContent(item) + '</span><br/>';
+ return '<span>' + BT.textContent(item) + '</span><br/>';
]]></script>
</td>
</tr>
@@ -312,7 +312,7 @@
<td type='opac/slot-data' query='datafield[tag=505]' class='rdetail_item'>
<script type='opac/slot-format'><![CDATA[
dojo.query('#tag505').removeClass('hide_me');
- return '<span>' + dojox.data.dom.textContent(item) + '</span><br/>';
+ return '<span>' + BT.textContent(item) + '</span><br/>';
]]></script>
</td>
</tr>
@@ -321,7 +321,7 @@
<td type='opac/slot-data' query='datafield[tag=506] subfield[code=a]' class='rdetail_item'>
<script type='opac/slot-format'><![CDATA[
dojo.query('#tag506').removeClass('hide_me');
- return '<span>' + dojox.data.dom.textContent(item) + '</span> ';
+ return '<span>' + BT.textContent(item) + '</span> ';
]]></script>
</td>
</tr>
@@ -330,7 +330,7 @@
<td type='opac/slot-data' query='datafield[tag=511]' class='rdetail_item'>
<script type='opac/slot-format'><![CDATA[
dojo.query('#tag511').removeClass('hide_me');
- return '<span>' + dojox.data.dom.textContent(item) + '</span><br/>';
+ return '<span>' + BT.textContent(item) + '</span><br/>';
]]></script>
</td>
</tr>
@@ -342,7 +342,7 @@
var text = '';
var list = dojo.query( 'subfield:not([code=4])', item );
for (var i =0; i < list.length; i++) {
- text += dojox.data.dom.textContent(list[i]) + ' ';
+ text += BT.textContent(list[i]) + ' ';
}
return '<span>' + text + '</span><br/>';
]]></script>
@@ -353,7 +353,7 @@
<td type='opac/slot-data' query='datafield[tag=780]' class='rdetail_item'>
<script type='opac/slot-format'><![CDATA[
dojo.query('#tag780').removeClass('hide_me');
- return '<span>' + dojox.data.dom.textContent(item) + '</span><br/>';
+ return '<span>' + BT.textContent(item) + '</span><br/>';
]]></script>
</td>
</tr>
@@ -362,7 +362,7 @@
<td type='opac/slot-data' query='datafield[tag=785]' class='rdetail_item'>
<script type='opac/slot-format'><![CDATA[
dojo.query('#tag785').removeClass('hide_me');
- return '<span>' + dojox.data.dom.textContent(item) + '</span><br/>';
+ return '<span>' + BT.textContent(item) + '</span><br/>';
]]></script>
</td>
</tr>
@@ -425,38 +425,36 @@
var url_list = "";
function subjectMe(tag, item) {
- dojo.query(tag).removeClass('hide_me');
+ dojo.query(tag).removeClass('hide_me');
var cgi = new CGI();
var other_params = [ 'd', 'l', 'r', 'av', 's', 'sd' ];
var total = '';
var output = [];
- var list = dojo.query( 'subfield:not([code=2])', item );
- var main_subject = '';
- for (var i =0; i < list.length; i++) {
- var current = "";
- total += dojox.data.dom.textContent(list[i]) + ' ';
- if (i > 0)
- current +='>> ';
- current += '<span><a class="search_link" href="rresult.xml?rt=subject&tp=subject&t=' + total;
+ dojo.query( 'subfield:not([code=2])', item ).forEach( function (onesub) {
+ var subtext = '';
+ try {
+ if (dojo.isIE) {
+ subtext = onesub.firstChild.nodeValue;
+ } else {
+ subtext = onesub.textContent;
+ }
+ total += subtext + ' ';
+ } catch (e) {
+ return;
+ }
+ var current = '<a class="search_link" href="rresult.xml?rt=subject&tp=subject&t=' + total;
for (var p in other_params) {
if (cgi.param(other_params[p]))
current += '&' + other_params[p] + '=' + cgi.param(other_params[p]);
}
- if (i > 0) {
- current += '">' + main_subject + dojox.data.dom.textContent(list[i]) + '</a>'
- } else {
- current += '">' + dojox.data.dom.textContent(list[i]) + '</a>'
- }
-
- main_subject += dojox.data.dom.textContent(list[i]) + ' -- ';
- current += '</span><br/>';
+ current += '">' + subtext + '</a>'
output.push(current);
- }
-
- return output.join(' ');
+ });
+ return '<span>' + output.join(' -- ') + '</span><br/>';
}
dojo.addOnLoad( function () {
+ setTimeout( function () {
var here = findOrgUnit(getLocation());
if (getDepth() > 0 || getDepth === 0 ) {
while (getDepth() < findOrgDepth(here))
@@ -465,6 +463,7 @@
dojo.require('openils.BibTemplate');
new openils.BibTemplate({ record : new CGI().param('r'), org_unit : here.shortname() }).render();
+ }, 0);
});
]]></script>
More information about the open-ils-commits
mailing list