[open-ils-commits] r18559 - in trunk/Open-ILS/xul/staff_client: chrome/content/cat server/cat (dbs)

svn at svn.open-ils.org svn at svn.open-ils.org
Mon Nov 1 16:41:19 EDT 2010


Author: dbs
Date: 2010-11-01 16:41:14 -0400 (Mon, 01 Nov 2010)
New Revision: 18559

Modified:
   trunk/Open-ILS/xul/staff_client/chrome/content/cat/opac.js
   trunk/Open-ILS/xul/staff_client/server/cat/marcedit.js
Log:
Replace hard-coded '(CONS)' for MARC control number identifier in authority records

We created an actor.org_unit_setting, 'cat.marc_control_number_identifier', for
specifying the preferred MARC control number identifier, but when we create a
new authority record from the MARC editor, the hardcoded value of 'CONS' is being
used.

This teaches the staff client how to pull the appropriate value from the AOUS
when invoking the MARC Editor.

Resolves https://bugs.launchpad.net/evergreen/+bug/669245


Modified: trunk/Open-ILS/xul/staff_client/chrome/content/cat/opac.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/cat/opac.js	2010-11-01 19:46:15 UTC (rev 18558)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/cat/opac.js	2010-11-01 20:41:14 UTC (rev 18559)
@@ -121,6 +121,7 @@
     var a =    xulG.url_prefix( urls.XUL_MARC_EDIT );
     var b =    {};
     var c =    {
+            'marc_control_number_identifier' : g.data.hash.aous['cat.marc_control_number_identifier'] || 'Set cat.marc_control_number_identifier in Library Settings',
             'record' : { 'url' : '/opac/extras/supercat/retrieve/marcxml/record/' + docid, "id": docid, "rtype": "bre" },
             'fast_add_item' : function(doc_id,cn_label,cp_barcode) {
                 try {

Modified: trunk/Open-ILS/xul/staff_client/server/cat/marcedit.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/cat/marcedit.js	2010-11-01 19:46:15 UTC (rev 18558)
+++ trunk/Open-ILS/xul/staff_client/server/cat/marcedit.js	2010-11-01 20:41:14 UTC (rev 18559)
@@ -142,6 +142,7 @@
             window.xulG = {};
             window.xulG.record = {};
             window.xulG.save = {};
+            window.xulG.marc_control_number_identifier = 'CONS';
 
             window.xulG.save.label = $('catStrings').getString('staff.cat.marcedit.save.label');
             window.xulG.save.func = function (r) { alert(r); }
@@ -2350,7 +2351,7 @@
                         [source_f, ses()]
                     );
                     if (new_auth && new_auth.id()) {
-                        var id_sf = <subfield code="0" xmlns="http://www.loc.gov/MARC21/slim">(CONS){new_auth.id()}</subfield>;
+                        var id_sf = <subfield code="0" xmlns="http://www.loc.gov/MARC21/slim">({xulG.marc_control_number_identifier}){new_auth.id()}</subfield>;
                         sf.parent().appendChild(id_sf);
                         var new_sf = marcSubfield(id_sf);
                         target.parentNode.appendChild(new_sf);
@@ -2602,7 +2603,7 @@
                         if (!new_rec) {
                             return '';
                         }
-                        var id_sf = <subfield code="0" xmlns="http://www.loc.gov/MARC21/slim">(CONS){new_rec.id()}</subfield>;
+                        var id_sf = <subfield code="0" xmlns="http://www.loc.gov/MARC21/slim">({xulG.marc_control_number_identifier}){new_rec.id()}</subfield>;
                         sf.parent().appendChild(id_sf);
                         var new_sf = marcSubfield(id_sf);
                         target.parentNode.appendChild(new_sf);



More information about the open-ils-commits mailing list