Show cover art in Z39.50 client. I'm slow, so it only hit me this year that we can...
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sun, 26 Sep 2010 06:34:22 +0000 (06:34 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sun, 26 Sep 2010 06:34:22 +0000 (06:34 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@18001 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/chrome/content/main/constants.js
Open-ILS/xul/staff_client/server/cat/z3950.js
Open-ILS/xul/staff_client/server/cat/z3950.xul

index b30fc13..4c2f42c 100644 (file)
@@ -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',
index 3c7e3ed..45fce2c 100644 (file)
@@ -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 {
index 3b63172..dc74212 100644 (file)
                     <button id="marc_import" label="&staff.cat.z3950.result_message.marc_import.label;" accesskey="&staff.cat.z3950.result_message.marc_import.accesskey;" disabled="true"/>
                     <button id="toggle_form_btn" command="toggle_form"/>
                 </hbox>
-                <deck id="deck" flex="1">
-                    <tree id="results" flex="1" enableColumnDrag="true" seltype="single"/>
-                    <iframe id="marc_frame" src="/xul/server/cat/marc_view.html" flex="1"/>
-                </deck>
+                <hbox flex="1">
+                    <image id="jacket_image" />
+                    <splitter id="jacket_splitter" collapse="before" oils_persist="state hidden"><grippy id="jacket_splitter_grippy"/></splitter>
+                    <deck id="deck" flex="1">
+                        <tree id="results" flex="1" enableColumnDrag="true" seltype="single"/>
+                        <iframe id="marc_frame" src="/xul/server/cat/marc_view.html" flex="1"/>
+                    </deck>
+                </hbox>
             </groupbox>
     </groupbox>