From: Simon Hieu Mai Date: Wed, 13 Mar 2013 13:38:47 +0000 (-0500) Subject: LP#921142: Fill in trailing spaces for fixed fields X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=refs%2Fheads%2Ftest_rel_2_3_4;p=evergreen%2Fpines.git LP#921142: Fill in trailing spaces for fixed fields MARC fixed fields are required to have all positions entered. This patch will fill in the trailing spaces automatic in fields that have more than one position allowed in them. Replace oninput into onblur for all of fixed fields. Signed-off-by: Simon Mai --- diff --git a/Open-ILS/xul/staff_client/server/cat/marcedit.js b/Open-ILS/xul/staff_client/server/cat/marcedit.js index 1fbf544dd6..1fa98b07b6 100644 --- a/Open-ILS/xul/staff_client/server/cat/marcedit.js +++ b/Open-ILS/xul/staff_client/server/cat/marcedit.js @@ -819,7 +819,11 @@ function updateFixedFields (element) { var new_value = element.value; // Don't take focus away/adjust the record on partial changes var length = element.getAttribute('maxlength'); - if(new_value.length < length) return true; + + // fill in trailing spaces automatic + for (var i = new_value.length;i < length;i++){ + new_value = new_value + ' '; + } var marc_rec = new MARC.Record ({ delimiter : '$', marcxml : xml_record.toXMLString() }); marc_rec.setFixedField(element.getAttribute('name'), new_value); diff --git a/Open-ILS/xul/staff_client/server/cat/marcedit.xul b/Open-ILS/xul/staff_client/server/cat/marcedit.xul index 2fd96890ef..f5f93c5cc7 100644 --- a/Open-ILS/xul/staff_client/server/cat/marcedit.xul +++ b/Open-ILS/xul/staff_client/server/cat/marcedit.xul @@ -80,157 +80,157 @@ -