callnumbers from the marc record
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 23 Feb 2006 05:57:52 +0000 (05:57 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 23 Feb 2006 05:57:52 +0000 (05:57 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@3181 dcc99617-32d9-48b4-a31d-7c20da2025e4

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

index dbe9d72..59c46fb 100644 (file)
@@ -5,6 +5,7 @@ var api = {
        'AUTH_DELETE' : { 'app' : 'open-ils.auth', 'method' : 'open-ils.auth.session.delete' },
        'BILL_PAY' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.money.payment' },
        'BLOB_CHECKOUTS_RETRIEVE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.actor.user.checked_out' },
+       'BLOB_MARC_CALLNUMBERS_RETRIEVE' : { 'app' : 'open-ils.cat', 'method' : 'open-ils.cat.biblio.record.marc_cn.retrieve' },
        'BUCKET_CREATE' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.container.create' },
        'BUCKET_DELETE' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.container.delete' },
        'BUCKET_FLESH' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.container.flesh' },
index 9c493a7..6a3e122 100644 (file)
 
                                JSAN.use('util.network'); g.network = new util.network();
 
+                               var cn_blob;
+                               try {
+                                       cn_blob = g.network.simple_request('BLOB_MARC_CALLNUMBERS_RETRIEVE',[g.doc_id]);
+                               } catch(E) {
+                                       cn_blob = [];
+                               }
+                               if (cn_blob.length > 0) {
+                                       var hbox = document.getElementById('marc_cn');
+                                       var ml = util.widgets.make_menulist(
+                                               util.functional.map_list(
+                                                       cn_blob,
+                                                       function(o) {
+                                                               for (var i in o) {
+                                                                       return [ i + ' -> ' + o[i], o[i] ];
+                                                               }
+                                                       }
+                                               )
+                                       ); hbox.appendChild(ml);
+                                       var btn = document.createElement('button');
+                                       btn.setAttribute('label','Apply');
+                                       btn.setAttribute('image','/xul/server/skin/media/images/down_arrow.gif');
+                                       hbox.appendChild(btn);
+                                       btn.addEventListener(
+                                               'command',
+                                               function() {
+                                                       var nl = document.getElementsByTagName('textbox');
+                                                       for (var i = 0; i < nl.length; i++) {
+                                                               if (nl[i].getAttribute('rel_vert_pos')==2 
+                                                                       && !nl[i].disabled) nl[i].value = ml.value;
+                                                       }
+                                               }, 
+                                               false
+                                       );
+                               }
+
                                var rows = document.getElementById('rows');
 
                                var node_id = 0;
        <groupbox flex="1" style="overflow: auto">
                <caption id="caption" label="Volume/Copy Creator"/>
                <hbox style="border-bottom: solid black thin">
+                       <hbox id="marc_cn"/>
                        <spacer flex="1" />
                        <button id="Create" label="Create" disabled="true" oncommand="g.stash_and_close();"/>
                </hbox>