[open-ils-commits] r19063 - branches/rel_1_6_2/Open-ILS/web/js/dojo/MARC (gmc)

svn at svn.open-ils.org svn at svn.open-ils.org
Thu Dec 23 08:51:06 EST 2010


Author: gmc
Date: 2010-12-23 08:51:04 -0500 (Thu, 23 Dec 2010)
New Revision: 19063

Modified:
   branches/rel_1_6_2/Open-ILS/web/js/dojo/MARC/Field.js
   branches/rel_1_6_2/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

Signed-off-by: Galen Charlton <gmc at esilibrary.com>

Modified: branches/rel_1_6_2/Open-ILS/web/js/dojo/MARC/Field.js
===================================================================
--- branches/rel_1_6_2/Open-ILS/web/js/dojo/MARC/Field.js	2010-12-23 13:43:38 UTC (rev 19062)
+++ branches/rel_1_6_2/Open-ILS/web/js/dojo/MARC/Field.js	2010-12-23 13:51:04 UTC (rev 19063)
@@ -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_2/Open-ILS/web/js/dojo/MARC/Record.js
===================================================================
--- branches/rel_1_6_2/Open-ILS/web/js/dojo/MARC/Record.js	2010-12-23 13:43:38 UTC (rev 19062)
+++ branches/rel_1_6_2/Open-ILS/web/js/dojo/MARC/Record.js	2010-12-23 13:51:04 UTC (rev 19063)
@@ -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