[open-ils-commits] r19061 - branches/rel_2_0/Open-ILS/web/js/dojo/MARC (gmc)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Dec 23 08:43:37 EST 2010
Author: gmc
Date: 2010-12-23 08:43:36 -0500 (Thu, 23 Dec 2010)
New Revision: 19061
Modified:
branches/rel_2_0/Open-ILS/web/js/dojo/MARC/Record.js
Log:
When the subfield delimiter is configured as "$" (the default), use {dollar} to represent a literal dollar sign. This is apparently in line with other Breaker-format tools. Fix suggested by Galen Charlton, thanks gmc!
Signed-off-by: Galen Charlton <gmc at esilibrary.com>
Modified: branches/rel_2_0/Open-ILS/web/js/dojo/MARC/Record.js
===================================================================
--- branches/rel_2_0/Open-ILS/web/js/dojo/MARC/Record.js 2010-12-23 13:43:34 UTC (rev 19060)
+++ branches/rel_2_0/Open-ILS/web/js/dojo/MARC/Record.js 2010-12-23 13:43:36 UTC (rev 19061)
@@ -272,7 +272,11 @@
ind2 : df_ind2(current_line),
subfields : dojo.map(
sf_list,
- function (sf) { return [ sf.substring(0,1), sf.substring(1) ] }
+ function (sf) {
+ var sf_data = sf.substring(1);
+ if (me.delimiter == '$') sf_data = sf_data.replace(/\{dollar\}/g, '$');
+ return [ sf.substring(0,1), sf_data ];
+ }
)
})
);
@@ -296,7 +300,9 @@
f.indicator(1).replace(' ','\\') +
f.indicator(2).replace(' ','\\') +
dojo.map( f.subfields, function (sf) {
- return me.delimiter + sf.join('');
+ var sf_data = sf[1];
+ if (me.delimiter == '$') sf_data = sf_data.replace(/\$/g, '{dollar}');
+ return me.delimiter + sf[0] + sf_data;
}).join('');
}
}).join('\n');
More information about the open-ils-commits
mailing list