[open-ils-commits] r19049 - trunk/Open-ILS/web/js/dojo/MARC (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Dec 22 21:12:44 EST 2010
Author: miker
Date: 2010-12-22 21:12:43 -0500 (Wed, 22 Dec 2010)
New Revision: 19049
Modified:
trunk/Open-ILS/web/js/dojo/MARC/Field.js
trunk/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: trunk/Open-ILS/web/js/dojo/MARC/Field.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/MARC/Field.js 2010-12-23 01:44:25 UTC (rev 19048)
+++ trunk/Open-ILS/web/js/dojo/MARC/Field.js 2010-12-23 02:12:43 UTC (rev 19049)
@@ -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: trunk/Open-ILS/web/js/dojo/MARC/Record.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/MARC/Record.js 2010-12-23 01:44:25 UTC (rev 19048)
+++ trunk/Open-ILS/web/js/dojo/MARC/Record.js 2010-12-23 02:12:43 UTC (rev 19049)
@@ -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