[open-ils-commits] r17358 - trunk/Open-ILS/xul/staff_client/server/cat (dbs)

svn at svn.open-ils.org svn at svn.open-ils.org
Thu Aug 26 21:19:27 EDT 2010


Author: dbs
Date: 2010-08-26 21:19:26 -0400 (Thu, 26 Aug 2010)
New Revision: 17358

Modified:
   trunk/Open-ILS/xul/staff_client/server/cat/marcedit.js
Log:
Restrict authority record fields to 1xx and 5xx when offering a match

When you right-click on a subfield eligible for authority control and display
the list of authority records that match the left-truncated subfield, we should
not display every field in the matching authority records; the 1xx and 5xx seem
like the obvious options to which the selection should be limited.


Modified: trunk/Open-ILS/xul/staff_client/server/cat/marcedit.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/cat/marcedit.js	2010-08-27 00:40:01 UTC (rev 17357)
+++ trunk/Open-ILS/xul/staff_client/server/cat/marcedit.js	2010-08-27 01:19:26 UTC (rev 17358)
@@ -1865,11 +1865,19 @@
         var fields = xml.datafield;
         for (var j in fields) {
 
+            /* Restrict options to Heading Information fields (1xx)
+             * and See Also From fields (5xx) rather than displaying
+             * every field in the authority record */
+            var tag = fields[j]. at tag;
+            if (tag.substr(0,1) != 1 && tag.substr(0,1) != 5) {
+                continue;
+            }
+
             var row = createRow(
                 {},
-                createLabel( { value : fields[j]. at tag } ),
-                createLabel( { value : fields[j]. at ind1 } ),
-                createLabel( { value : fields[j]. at ind2 } )
+                createLabel( { "value" : tag } ),
+                createLabel( { "value" : fields[j]. at ind1 } ),
+                createLabel( { "value" : fields[j]. at ind2 } )
             );
 
             var sf_box = createHbox();
@@ -1878,10 +1886,10 @@
             for (var k in subfields) {
                 sf_box.appendChild(
                     createCheckbox(
-                        { label    : '\u2021' + subfields[k]. at code + ' ' + subfields[k],
-                          subfield : subfields[k]. at code,
-                          tag      : subfields[k].parent(). at tag,
-                          value    : subfields[k]
+                        { "label"    : '\u2021' + subfields[k]. at code + ' ' + subfields[k],
+                          "subfield" : subfields[k]. at code,
+                          "tag"      : subfields[k].parent(). at tag,
+                          "value"    : subfields[k]
                         }
                     )
                 );



More information about the open-ils-commits mailing list