From 3bfc83ed0b7b5a0efd666475c3194decdfbd1c5d Mon Sep 17 00:00:00 2001 From: gmc Date: Thu, 23 Dec 2010 15:14:10 +0000 Subject: [PATCH] further fixes to null indicator handling in flat-text MARC editor [1] ensure that null indicators are converted to blanks [2] fix glitch when supplying default indicator values Signed-off-by: Galen Charlton git-svn-id: svn://svn.open-ils.org/ILS/trunk@19066 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/js/dojo/MARC/Field.js | 4 ++-- Open-ILS/web/js/dojo/MARC/Record.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Open-ILS/web/js/dojo/MARC/Field.js b/Open-ILS/web/js/dojo/MARC/Field.js index 1cc342213..c9a235923 100644 --- a/Open-ILS/web/js/dojo/MARC/Field.js +++ b/Open-ILS/web/js/dojo/MARC/Field.js @@ -31,8 +31,8 @@ if(!dojo._hasResource["MARC.Field"]) { constructor : function(kwargs) { this.record = kwargs.record; this.tag = kwargs.tag; - this.ind1 = kwargs.ind1; - this.ind2 = kwargs.ind2; + this.ind1 = kwargs.ind1 || ' '; + this.ind2 = kwargs.ind2 || ' '; this.data = kwargs.data; if (kwargs.subfields) this.subfields = kwargs.subfields; else this.subfields = []; diff --git a/Open-ILS/web/js/dojo/MARC/Record.js b/Open-ILS/web/js/dojo/MARC/Record.js index aca1aa08f..3aea14c3a 100644 --- a/Open-ILS/web/js/dojo/MARC/Record.js +++ b/Open-ILS/web/js/dojo/MARC/Record.js @@ -256,7 +256,7 @@ 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); + 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