From 2a8deeb6d95741beae0883bff9fa12bede78259c Mon Sep 17 00:00:00 2001 From: miker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4> Date: Sat, 28 Nov 2009 23:32:32 +0000 Subject: [PATCH] use the correct name for marcbreaker format; add support for sf delimiter to batches git-svn-id: svn://svn.open-ils.org/ILS/trunk@15037 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/js/dojo/MARC/Batch.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Open-ILS/web/js/dojo/MARC/Batch.js b/Open-ILS/web/js/dojo/MARC/Batch.js index 88f0c241fd..23860378c9 100644 --- a/Open-ILS/web/js/dojo/MARC/Batch.js +++ b/Open-ILS/web/js/dojo/MARC/Batch.js @@ -27,6 +27,7 @@ if(!dojo._hasResource["MARC.Batch"]) { this.ready = false; this.records = []; this.source = kwargs.source; + this.delimiter = kwargs.delimiter this.current_record = 0; if (this.source) this.ready = true; @@ -42,9 +43,9 @@ if(!dojo._hasResource["MARC.Batch"]) { } else if (this.source.match(/^\s*</)) { // this is xml text this.source = dojox.xml.parser.parse( this.source ); this.parse(); - } else { // must be a breaker doc. split on blank lines + } else { // must be a marcbreaker doc. split on blank lines this.source = this.source.split(/^$/); - this.type = 'breaker'; + this.type = 'marcbreaker'; } }, @@ -67,6 +68,7 @@ if(!dojo._hasResource["MARC.Batch"]) { if (chunk) { var args = {}; args[this.type] = chunk; + if (this.delimiter) args.delimiter = this.delimiter; return new MARC.Record(args); } -- 2.11.0