From: dbs Date: Tue, 12 Apr 2011 20:18:51 +0000 (+0000) Subject: A working rdetail_summary.xml for LUL skin X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=e0987124b1a251c5f221d37c6fbcdc72e894cf9e;p=contrib%2FConifer.git A working rdetail_summary.xml for LUL skin subjectMe() gets objects with .textContent properties that BT.textContent() / dojox.data.dom.textContent() doesn't parse; works fine in the inline implementation in the default skin though. Merge in the other 2.0-isms as we go. git-svn-id: svn://svn.open-ils.org/ILS-Contrib/conifer/branches/rel_2_0@1334 6d9bc8c9-1ec2-4278-b937-99fde70a366f --- diff --git a/web/opac/skin/lul/xml/rdetail/rdetail_summary.xml b/web/opac/skin/lul/xml/rdetail/rdetail_summary.xml index 1afb2b057b..90fbbb78d9 100644 --- a/web/opac/skin/lul/xml/rdetail/rdetail_summary.xml +++ b/web/opac/skin/lul/xml/rdetail/rdetail_summary.xml @@ -29,7 +29,7 @@ &common.title; @@ -51,7 +51,7 @@ @@ -67,7 +67,7 @@ @@ -76,7 +76,7 @@ @@ -85,7 +85,7 @@ @@ -94,7 +94,7 @@ @@ -104,7 +104,7 @@ @@ -157,7 +157,7 @@ @@ -181,7 +181,7 @@ @@ -307,7 +307,7 @@ @@ -316,7 +316,7 @@ @@ -325,7 +325,7 @@ @@ -334,7 +334,7 @@ @@ -346,7 +346,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 '' + text + '
'; ]]> @@ -357,7 +357,7 @@ @@ -366,7 +366,7 @@ @@ -395,6 +395,65 @@ ]]> + + &rdetail.summary.issues_held; + + ${holdingsStatement} + + + @@ -417,34 +476,41 @@ var first_issn = true; 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 ); - for (var i =0; i < list.length; i++) { - total += dojox.data.dom.textContent(list[i]) + ' '; + dojo.query( 'subfield:not([code=2])', item ).forEach( function (onesub) { + var subtext; + try { + subtext = onesub.textContent; + total += subtext + ' '; + } catch (e) { + return; + } var current = '' + dojox.data.dom.textContent(list[i]) + '' + current += '">' + subtext + '' output.push(current); - } + }); return '' + output.join(' -- ') + '
'; } dojo.addOnLoad( function () { - 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(); + setTimeout( function () { + 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); }); ]]>