[open-ils-commits] r19050 - branches/rel_1_6/Open-ILS/web/js/dojo/MARC (miker)

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Dec 22 21:14:48 EST 2010


Author: miker
Date: 2010-12-22 21:14:46 -0500 (Wed, 22 Dec 2010)
New Revision: 19050

Modified:
   branches/rel_1_6/Open-ILS/web/js/dojo/MARC/Field.js
   branches/rel_1_6/Open-ILS/web/js/dojo/MARC/Record.js
Log:
addressing two Breaker-format issues: 1) supply an "empty" (space) value for indicators in the internal format if they are left out and 2) add indicator placeholders to incoming Breaker datafield lines if they seem to be missing.  Addresses https://bugs.launchpad.net/evergreen/+bug/693468

Modified: branches/rel_1_6/Open-ILS/web/js/dojo/MARC/Field.js
===================================================================
--- branches/rel_1_6/Open-ILS/web/js/dojo/MARC/Field.js	2010-12-23 02:12:43 UTC (rev 19049)
+++ branches/rel_1_6/Open-ILS/web/js/dojo/MARC/Field.js	2010-12-23 02:14:46 UTC (rev 19050)
@@ -23,8 +23,8 @@
         error : false, // MARC record pointer
         record : null, // MARC record pointer
         tag : '', // MARC tag
-        ind1 : '', // MARC indicator 1
-        ind2 : '', // MARC indicator 2
+        ind1 : ' ', // MARC indicator 1
+        ind2 : ' ', // MARC indicator 2
         data : '', // MARC data for a controlfield element
         subfields : [], // list of MARC subfields for a datafield element
 

Modified: branches/rel_1_6/Open-ILS/web/js/dojo/MARC/Record.js
===================================================================
--- branches/rel_1_6/Open-ILS/web/js/dojo/MARC/Record.js	2010-12-23 02:12:43 UTC (rev 19049)
+++ branches/rel_1_6/Open-ILS/web/js/dojo/MARC/Record.js	2010-12-23 02:14:46 UTC (rev 19050)
@@ -255,6 +255,9 @@
                         );
                     }
                 } else {
+                    if (current_line.substring(4,5) == me.delimiter) // add delimiters if they were left out
+                        current_line = current_line.substring(0,3) + '\\\\' + current_line.substring(4);
+
                     var data = df_line_data(current_line);
                     if (!(data.substring(0,1) == me.delimiter)) data = me.delimiter + 'a' + data;
 



More information about the open-ils-commits mailing list