From: phasefx Date: Sun, 26 Sep 2010 06:34:22 +0000 (+0000) Subject: Show cover art in Z39.50 client. I'm slow, so it only hit me this year that we can... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=c4c1af116b2f58b0f2d6fa4daff5810955e6bf3f;p=evergreen%2Ftadl.git Show cover art in Z39.50 client. I'm slow, so it only hit me this year that we can show added content for material not actually in the catalog yet git-svn-id: svn://svn.open-ils.org/ILS/trunk@18001 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/xul/staff_client/chrome/content/main/constants.js b/Open-ILS/xul/staff_client/chrome/content/main/constants.js index b30fc13162..4c2f42c7b2 100644 --- a/Open-ILS/xul/staff_client/chrome/content/main/constants.js +++ b/Open-ILS/xul/staff_client/chrome/content/main/constants.js @@ -351,6 +351,8 @@ var urls = { 'browser' : '/opac/' + LOCALE + '/skin/default/xml/advanced.xml?nps=1', 'fieldmapper' : '/opac/common/js/fmall.js', 'xsl_marc2html' : '/opac/extras/xsl/oilsMARC21slim2HTML.xsl', + 'ac_jacket_small' : '/opac/extras/ac/jacket/small/', + 'ac_jacket_large' : '/opac/extras/ac/jacket/large/', 'AUDIO_good' : '/xul/server/skin/media/audio/bonus.wav', 'AUDIO_bad' : '/xul/server/skin/media/audio/question.wav', diff --git a/Open-ILS/xul/staff_client/server/cat/z3950.js b/Open-ILS/xul/staff_client/server/cat/z3950.js index 3c7e3ede2f..45fce2c753 100644 --- a/Open-ILS/xul/staff_client/server/cat/z3950.js +++ b/Open-ILS/xul/staff_client/server/cat/z3950.js @@ -61,7 +61,19 @@ cat.z3950.prototype = { document.getElementById('sel_clip').setAttribute('disabled', sel.length < 1); var list = util.functional.map_list( sel, - function(o) { return o.getAttribute('retrieve_id'); } + function(o) { + if ( $('jacket_image') ) { + // A side-effect in this map function, mu hahaha + if (o.getAttribute('isbn')) { + $('jacket_image').setAttribute('src',urls.ac_jacket_large+o.getAttribute('isbn')); + $('jacket_image').setAttribute('tooltiptext',urls.ac_jacket_large+o.getAttribute('isbn')); + } else { + $('jacket_image').setAttribute('src',''); + $('jacket_image').setAttribute('tooltiptext',''); + } + } + return o.getAttribute('retrieve_id'); + } ); obj.error.sdump('D_TRACE','cat/z3950: selection list = ' + js2JSON(list) ); obj.controller.view.marc_import.disabled = false; @@ -656,6 +668,7 @@ cat.z3950.prototype = { } } ); + n.my_node.setAttribute('isbn', function(a){return a;}(obj.result_set[ obj.number_of_result_sets ].records[j].mvr).isbn()); if (!f) { n.my_node.parentNode.focus(); f = n; } } } else { diff --git a/Open-ILS/xul/staff_client/server/cat/z3950.xul b/Open-ILS/xul/staff_client/server/cat/z3950.xul index 3b63172c91..dc74212ad6 100644 --- a/Open-ILS/xul/staff_client/server/cat/z3950.xul +++ b/Open-ILS/xul/staff_client/server/cat/z3950.xul @@ -187,10 +187,14 @@