From 820e58ccd20772fefd9f7dc8c9e701a35bba0ca6 Mon Sep 17 00:00:00 2001 From: Simon Hieu Mai Date: Tue, 23 Jul 2013 10:16:02 -0500 Subject: [PATCH] LP#1203792: Multiple 006/007 fields for MARC Editor This patch will make the MARC Edtior to support adding multiple 006/007 fields per bib record. It changes the current "Add/Replace 006/007" of right-clicking drop down menu into "Add 006/007" that lets staff add/edit multiple 006/007 fields. To delete any these fields, just right click and select "Remove Row" as the way we've used to remove other data fields. Signed-off-by: Simon Hieu Mai --- Open-ILS/xul/staff_client/server/cat/marcedit.js | 37 ++++++++++++++++++++-- .../server/locale/en-US/cat.properties | 4 +-- 2 files changed, 37 insertions(+), 4 deletions(-) diff --git a/Open-ILS/xul/staff_client/server/cat/marcedit.js b/Open-ILS/xul/staff_client/server/cat/marcedit.js index 61b266786a..6fd1a27c84 100644 --- a/Open-ILS/xul/staff_client/server/cat/marcedit.js +++ b/Open-ILS/xul/staff_client/server/cat/marcedit.js @@ -904,7 +904,7 @@ function marcLeader (leader) { function marcControlfield (field) { tagname = field.@tag.toString().substr(2); var row; - if (tagname == '1' || tagname == '3' || tagname == '6' || tagname == '7' || tagname == '8') { + if (tagname == '1' || tagname == '3' || tagname == '8') { row = createRow( { class : 'marcControlfieldRow', tag : '_' + tagname }, @@ -932,7 +932,40 @@ function marcControlfield (field) { context : 'clipboard', size : 50, maxlength : 50 } ) - ); + ); + } else if (tagname == '6' || tagname == '7') { + row = createRow( + { class : 'marcControlfieldRow', + tag : '_' + tagname }, + createMARCTextbox( + field.@tag, + { value : field.@tag, + class : 'plain marcTag', + name : 'marcTag', + context : 'tags_popup', + oninput : 'if (this.value.length == 3) { this.nextSibling.focus(); }', + size : 3, + maxlength : 3, + onmouseover : 'current_focus = this; getTooltip(this, "tag");' } ), + createLabel( + { value : field.@ind1, + class : 'marcInd1', + onmouseover : 'getTooltip(this, "ind1");', + tooltipid : 'tag' + field.@tag + 'ind1val' + field.@ind1 } ), + createLabel( + { value : field.@ind2, + class : 'marcInd2', + onmouseover : 'getTooltip(this, "ind2");', + tooltipid : 'tag' + field.@tag + 'ind2val' + field.@ind2 } ), + createMARCTextbox( + field, + { value : field.text(), + class : 'plain marcEditableControlfield', + name : 'CONTROL' + tagname, + context : 'clipboard', + size : 50, + maxlength : 50 } ) + ); } else { row = createRow( { class : 'marcControlfieldRow', diff --git a/Open-ILS/xul/staff_client/server/locale/en-US/cat.properties b/Open-ILS/xul/staff_client/server/locale/en-US/cat.properties index f42ec10cd3..bdb6f5f034 100644 --- a/Open-ILS/xul/staff_client/server/locale/en-US/cat.properties +++ b/Open-ILS/xul/staff_client/server/locale/en-US/cat.properties @@ -258,8 +258,8 @@ staff.cat.marcedit.marcTag.LDR.label=MARC Leader staff.cat.marcedit.add_row.label=Add Row staff.cat.marcedit.insert_row.label=Insert Row staff.cat.marcedit.remove_row.label=Remove Row -staff.cat.marcedit.replace_006.label=Add/Replace 006 -staff.cat.marcedit.replace_007.label=Add/Replace 007 +staff.cat.marcedit.replace_006.label=Add 006 +staff.cat.marcedit.replace_007.label=Add 007 staff.cat.marcedit.replace_008.label=Add/Replace 008 staff.cat.marcedit.not_authority_field.label=Not a controlled subfield staff.cat.marcedit.apply_full.label=Apply Full Authority (1XX) -- 2.11.0