From 2f7b968cb761fac0fabd545f67abf7695c681921 Mon Sep 17 00:00:00 2001 From: gmc Date: Thu, 23 Dec 2010 13:43:34 +0000 Subject: [PATCH] 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 git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_2_0@19060 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/js/dojo/MARC/Field.js | 4 ++-- Open-ILS/web/js/dojo/MARC/Record.js | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Open-ILS/web/js/dojo/MARC/Field.js b/Open-ILS/web/js/dojo/MARC/Field.js index 878392867a..1cc3422138 100644 --- a/Open-ILS/web/js/dojo/MARC/Field.js +++ b/Open-ILS/web/js/dojo/MARC/Field.js @@ -23,8 +23,8 @@ if(!dojo._hasResource["MARC.Field"]) { 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 diff --git a/Open-ILS/web/js/dojo/MARC/Record.js b/Open-ILS/web/js/dojo/MARC/Record.js index 1f2e51aabb..a55bb77181 100644 --- a/Open-ILS/web/js/dojo/MARC/Record.js +++ b/Open-ILS/web/js/dojo/MARC/Record.js @@ -255,6 +255,9 @@ if(!dojo._hasResource["MARC.Record"]) { ); } } 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; -- 2.11.0