[open-ils-commits] r1422 - in conifer/branches/rel_2_0/web/opac/skin: algoma/xml/rdetail default/xml/rdetail lul/xml/rdetail uwin/xml/rdetail (dbs)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Apr 26 11:06:09 EDT 2011
Author: dbs
Date: 2011-04-26 11:06:07 -0400 (Tue, 26 Apr 2011)
New Revision: 1422
Modified:
conifer/branches/rel_2_0/web/opac/skin/algoma/xml/rdetail/rdetail_summary.xml
conifer/branches/rel_2_0/web/opac/skin/default/xml/rdetail/rdetail_summary.xml
conifer/branches/rel_2_0/web/opac/skin/lul/xml/rdetail/rdetail_summary.xml
conifer/branches/rel_2_0/web/opac/skin/uwin/xml/rdetail/rdetail_summary.xml
Log:
Adopt the more sophisticated subject handling from trunk
The core skin limits display of subject subfields to the a-z range,
which is useful as we begin to add subfield 0 via the authority
control fields.
Modified: conifer/branches/rel_2_0/web/opac/skin/algoma/xml/rdetail/rdetail_summary.xml
===================================================================
--- conifer/branches/rel_2_0/web/opac/skin/algoma/xml/rdetail/rdetail_summary.xml 2011-04-22 20:27:10 UTC (rev 1421)
+++ conifer/branches/rel_2_0/web/opac/skin/algoma/xml/rdetail/rdetail_summary.xml 2011-04-26 15:06:07 UTC (rev 1422)
@@ -481,27 +481,35 @@
var other_params = [ 'd', 'l', 'r', 'av', 's', 'sd' ];
var total = '';
var output = [];
- dojo.query( 'subfield:not([code=2])', item ).forEach( function (onesub) {
+ dojo.query( 'subfield', item ).forEach( function (onesub) {
var subtext = '';
+ var sub_code = onesub.getAttribute('code');
try {
if (dojo.isIE) {
subtext = onesub.firstChild.nodeValue;
} else {
subtext = onesub.textContent;
}
- total += subtext + ' ';
+ if ( sub_code.match(/[a-z]/i) ) {
+ var current = '';
+ if ( sub_code.match(/[vxyz]/ ) ) {
+ current += '-- ';
+ }
+ total += subtext + ' ';
+ current += '<a class="search_link" href="rresult.xml?rt=subject&tp=subject&t=' + total.replace(/\s+$/, '');
+ for (var p in other_params) {
+ if (cgi.param(other_params[p])) {
+ current += '&' + other_params[p] + '=' + cgi.param(other_params[p]);
+ }
+ }
+ current += '">' + subtext + '</a>'
+ output.push(current);
+ }
} 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]);
- }
- current += '">' + subtext + '</a>'
- output.push(current);
});
- return '<span>' + output.join(' -- ') + '</span><br/>';
+ return '<span>' + output.join(' ') + '</span><br/>';
}
dojo.addOnLoad( function () {
Modified: conifer/branches/rel_2_0/web/opac/skin/default/xml/rdetail/rdetail_summary.xml
===================================================================
--- conifer/branches/rel_2_0/web/opac/skin/default/xml/rdetail/rdetail_summary.xml 2011-04-22 20:27:10 UTC (rev 1421)
+++ conifer/branches/rel_2_0/web/opac/skin/default/xml/rdetail/rdetail_summary.xml 2011-04-26 15:06:07 UTC (rev 1422)
@@ -461,27 +461,35 @@
var other_params = [ 'd', 'l', 'r', 'av', 's', 'sd' ];
var total = '';
var output = [];
- dojo.query( 'subfield:not([code=2])', item ).forEach( function (onesub) {
+ dojo.query( 'subfield', item ).forEach( function (onesub) {
var subtext = '';
+ var sub_code = onesub.getAttribute('code');
try {
if (dojo.isIE) {
subtext = onesub.firstChild.nodeValue;
} else {
subtext = onesub.textContent;
}
- total += subtext + ' ';
+ if ( sub_code.match(/[a-z]/i) ) {
+ var current = '';
+ if ( sub_code.match(/[vxyz]/ ) ) {
+ current += '-- ';
+ }
+ total += subtext + ' ';
+ current += '<a class="search_link" href="rresult.xml?rt=subject&tp=subject&t=' + total.replace(/\s+$/, '');
+ for (var p in other_params) {
+ if (cgi.param(other_params[p])) {
+ current += '&' + other_params[p] + '=' + cgi.param(other_params[p]);
+ }
+ }
+ current += '">' + subtext + '</a>'
+ output.push(current);
+ }
} 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]);
- }
- current += '">' + subtext + '</a>'
- output.push(current);
});
- return '<span>' + output.join(' -- ') + '</span><br/>';
+ return '<span>' + output.join(' ') + '</span><br/>';
}
dojo.addOnLoad( function () {
Modified: conifer/branches/rel_2_0/web/opac/skin/lul/xml/rdetail/rdetail_summary.xml
===================================================================
--- conifer/branches/rel_2_0/web/opac/skin/lul/xml/rdetail/rdetail_summary.xml 2011-04-22 20:27:10 UTC (rev 1421)
+++ conifer/branches/rel_2_0/web/opac/skin/lul/xml/rdetail/rdetail_summary.xml 2011-04-26 15:06:07 UTC (rev 1422)
@@ -481,27 +481,35 @@
var other_params = [ 'd', 'l', 'r', 'av', 's', 'sd' ];
var total = '';
var output = [];
- dojo.query( 'subfield:not([code=2])', item ).forEach( function (onesub) {
+ dojo.query( 'subfield', item ).forEach( function (onesub) {
var subtext = '';
+ var sub_code = onesub.getAttribute('code');
try {
if (dojo.isIE) {
subtext = onesub.firstChild.nodeValue;
} else {
subtext = onesub.textContent;
}
- total += subtext + ' ';
+ if ( sub_code.match(/[a-z]/i) ) {
+ var current = '';
+ if ( sub_code.match(/[vxyz]/ ) ) {
+ current += '-- ';
+ }
+ total += subtext + ' ';
+ current += '<a class="search_link" href="rresult.xml?rt=subject&tp=subject&t=' + total.replace(/\s+$/, '');
+ for (var p in other_params) {
+ if (cgi.param(other_params[p])) {
+ current += '&' + other_params[p] + '=' + cgi.param(other_params[p]);
+ }
+ }
+ current += '">' + subtext + '</a>'
+ output.push(current);
+ }
} 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]);
- }
- current += '">' + subtext + '</a>'
- output.push(current);
});
- return '<span>' + output.join(' -- ') + '</span><br/>';
+ return '<span>' + output.join(' ') + '</span><br/>';
}
dojo.addOnLoad( function () {
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-22 20:27:10 UTC (rev 1421)
+++ conifer/branches/rel_2_0/web/opac/skin/uwin/xml/rdetail/rdetail_summary.xml 2011-04-26 15:06:07 UTC (rev 1422)
@@ -91,7 +91,7 @@
</tr>
<tr class='hide_me' id='tag022'>
<td nowrap='nowrap' class='rdetail_desc' id='issn_title'>&common.issn;</td>
- <td type='opac/slot-data' query='datafield[tag=022]' class='rdetail_ite' id='rdetail_issn'>
+ <td type='opac/slot-data' query='datafield[tag=022]' class='rdetail_item' id='rdetail_issn'>
<script type='opac/slot-format'><![CDATA[
dojo.query('#tag022').removeClass('hide_me');
var issn_raw = dojo.trim(BT.textContent(item));
@@ -430,40 +430,48 @@
var other_params = [ 'd', 'l', 'r', 'av', 's', 'sd' ];
var total = '';
var output = [];
- dojo.query( 'subfield:not([code=2])', item ).forEach( function (onesub) {
+ dojo.query( 'subfield', item ).forEach( function (onesub) {
var subtext = '';
+ var sub_code = onesub.getAttribute('code');
try {
if (dojo.isIE) {
subtext = onesub.firstChild.nodeValue;
} else {
subtext = onesub.textContent;
}
- total += subtext + ' ';
+ if ( sub_code.match(/[a-z]/i) ) {
+ var current = '';
+ if ( sub_code.match(/[vxyz]/ ) ) {
+ current += '-- ';
+ }
+ total += subtext + ' ';
+ current += '<a class="search_link" href="rresult.xml?rt=subject&tp=subject&t=' + total.replace(/\s+$/, '');
+ for (var p in other_params) {
+ if (cgi.param(other_params[p])) {
+ current += '&' + other_params[p] + '=' + cgi.param(other_params[p]);
+ }
+ }
+ current += '">' + subtext + '</a>'
+ output.push(current);
+ }
} 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]);
- }
- current += '">' + subtext + '</a>'
- output.push(current);
});
- return '<span>' + output.join(' -- ') + '</span><br/>';
+ return '<span>' + output.join(' ') + '</span><br/>';
}
dojo.addOnLoad( function () {
setTimeout( function () {
- var here = findOrgUnit(getLocation());
- if (getDepth() > 0 || getDepth === 0 ) {
- while (getDepth() < findOrgDepth(here))
- here = findOrgUnit( here.parent_ou() );
- }
+ var here = findOrgUnit(getLocation());
+ if (getDepth() > 0 || getDepth === 0 ) {
+ while (getDepth() < findOrgDepth(here))
+ here = findOrgUnit( here.parent_ou() );
+ }
- dojo.require('openils.BibTemplate');
- new openils.BibTemplate({ record : new CGI().param('r'), org_unit : here.shortname() }).render();
- }, 0);
+ 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