From: dbs Date: Fri, 24 Sep 2010 14:44:57 +0000 (+0000) Subject: Add circulation library to the brief result information; necessary on a multi-library... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=cb60604a8c38610861163b9d37cca6c3e3034f41;p=contrib%2FConifer.git Add circulation library to the brief result information; necessary on a multi-library campus Also, get consistent about the createTextNode / appendChild pattern rather than innerHTML property for text. Both seem to work; it's just a personal preference. git-svn-id: svn://svn.open-ils.org/ILS-Contrib/conifer/branches/rel_1_6_1@1006 6d9bc8c9-1ec2-4278-b937-99fde70a366f --- diff --git a/web/opac/skin/lul/xml/result/result_table.xml b/web/opac/skin/lul/xml/result/result_table.xml index 3eeef8c5c6..0eb9d8ddba 100644 --- a/web/opac/skin/lul/xml/result/result_table.xml +++ b/web/opac/skin/lul/xml/result/result_table.xml @@ -171,43 +171,43 @@ if (cp.getAttribute('deleted') == 't') { return; } + var cp_entry = dojo.create('div'); var loc_id; var vol_appended = false; dojo.query('location', cp).forEach(function (location) { loc_id = parseInt(location.getAttribute('ident')); if (loc_id != 8 && loc_id != 20 && loc_id != 185 && loc_id != 156) { if (!vol_appended) { - dojo.create('span',{ "style": "font-weight: bold;", - innerHTML: vol.getAttribute('label')}, - output); + var cn = dojo.create('span', { style: "font-weight: bold;" }, cp_entry); + var cn_txt = dojo.doc.createTextNode(vol.getAttribute('label')); + cn.appendChild(cn_txt); vol_appended = true; } - dojo.create('span', { className: 'live_separator_cell', - "innerHTML": ' - '}, - output); - dojo.create('span', { "style": "font-weight: bold;", - "innerHTML": dojox.xml.parser.textContent(location)}, - output); + var loc = dojo.create('span', { "style": "font-weight: bold;"}, cp_entry); + var loc_txt = dojo.doc.createTextNode(' - ' + dojox.xml.parser.textContent(location)); + loc.appendChild(loc_txt); } }); if (loc_id == 8 || loc_id == 20 || loc_id == 185 || loc_id == 156) { return; } + dojo.query('circ_lib', cp).forEach(function (circ_lib) { + var cp_lib = dojo.create('span', { "style": "font-weight: bold;" }, cp_entry, "first"); + var cp_lib_txt = dojo.doc.createTextNode(circ_lib.getAttribute('name') + ' - '); + cp_lib.appendChild(cp_lib_txt); + }); dojo.query('status', cp).forEach(function (status) { - var pfx = dojo.doc.createTextNode(' ('); - output.appendChild(pfx); - dojo.create('span', { "style": "font-weight: bold;", - "innerHTML": dojox.xml.parser.textContent(status) }, output); - var sfx = dojo.doc.createTextNode(')'); - output.appendChild(sfx); + var cp_status = dojo.create('span', { "style": "font-weight: bold;" }, cp_entry); + var cp_status_txt = dojo.doc.createTextNode(' (' + dojox.xml.parser.textContent(status) + ')'); + cp_status.appendChild(cp_status_txt); }); - dojo.create('br', null, output); item_cnt++; if (item_cnt >= max_items) { - output.appendChild(dojo.doc.createTextNode('... more print items listed in full record')); - dojo.create('br', null, output); + dojo.create('br', null, cp_entry); + cp_entry.appendChild(dojo.doc.createTextNode('... more print items listed in full record')); } + output.appendChild(cp_entry); }); });