From bbcdc05ca840ce1050f1ae9491e785c210e47a8e Mon Sep 17 00:00:00 2001 From: miker Date: Thu, 23 Dec 2010 02:12:43 +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 git-svn-id: svn://svn.open-ils.org/ILS/trunk@19049 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