From 6353134d549238235e732f84cbdfd00fc86cc44a Mon Sep 17 00:00:00 2001 From: erickson Date: Wed, 24 Mar 2010 18:32:46 +0000 Subject: [PATCH] added import profile selector and auto-merge-1-match options to main upload page git-svn-id: svn://svn.open-ils.org/ILS/trunk@15954 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/examples/fm_IDL.xml | 2 +- Open-ILS/web/js/ui/default/vandelay/vandelay.js | 20 +++++++++++++++++++- Open-ILS/web/opac/locale/en-US/vandelay.dtd | 2 ++ .../web/templates/default/vandelay/inc/profiles.tt2 | 4 +--- .../web/templates/default/vandelay/inc/upload.tt2 | 14 +++++++++++++- 5 files changed, 36 insertions(+), 6 deletions(-) diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml index 52cb2260fa..d6844f0586 100644 --- a/Open-ILS/examples/fm_IDL.xml +++ b/Open-ILS/examples/fm_IDL.xml @@ -146,7 +146,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - + diff --git a/Open-ILS/web/js/ui/default/vandelay/vandelay.js b/Open-ILS/web/js/ui/default/vandelay/vandelay.js index 8f10cc3310..0af7275abd 100644 --- a/Open-ILS/web/js/ui/default/vandelay/vandelay.js +++ b/Open-ILS/web/js/ui/default/vandelay/vandelay.js @@ -42,6 +42,7 @@ dojo.require('openils.widget.GridColumnPicker'); dojo.require('openils.PermaCrud'); dojo.require('openils.widget.OrgUnitFilteringSelect'); dojo.require('openils.widget.AutoGrid'); +dojo.require('openils.widget.AutoFieldWidget'); var globalDivs = [ @@ -102,6 +103,12 @@ function vlInit() { runStartupCommands(); } + var profiles = new openils.PermaCrud().retrieveAll('vmp'); + vlUploadMergeProfile.store = new dojo.data.ItemFileReadStore({data:fieldmapper.vmp.toStoreData(profiles)}); + vlUploadMergeProfile.labelAttr = 'name'; + vlUploadMergeProfile.searchAttr = 'name'; + vlUploadMergeProfile.startup(); + // Fetch the bib and authority attribute definitions vlFetchBibAttrDefs(function () { checkInitDone(); }); vlFetchAuthAttrDefs(function () { checkInitDone(); }); @@ -838,6 +845,17 @@ function vlImportRecordQueue(type, queueId, noMatchOnly, onload) { vlUploadQueueAutoOverlayExact.checked = false; } + if(vlUploadQueueAutoOverlay1Match.checked) { + options.auto_overlay_1match = true; + vlUploadQueueAutoOverlay1Match.checked = false; + } + + + var profile = vlUploadMergeProfile.attr('value'); + if(profile != null && profile != '') { + options.merge_profile = profile; + } + fieldmapper.standardRequest( ['open-ils.vandelay', method], { async: true, @@ -877,7 +895,7 @@ function batchUpload() { currentType = dijit.byId('vl-record-type').getValue(); var handleProcessSpool = function() { - if(vlUploadQueueAutoImport.checked || vlUploadQueueAutoOverlayExact.checked) { + if(vlUploadQueueAutoImport.checked || vlUploadQueueAutoOverlayExact.checked || vlUploadQueueAutoOverlay1Match.checked) { vlImportRecordQueue( currentType, diff --git a/Open-ILS/web/opac/locale/en-US/vandelay.dtd b/Open-ILS/web/opac/locale/en-US/vandelay.dtd index 1f64fdada3..f0a3369d89 100644 --- a/Open-ILS/web/opac/locale/en-US/vandelay.dtd +++ b/Open-ILS/web/opac/locale/en-US/vandelay.dtd @@ -3,6 +3,8 @@ + + diff --git a/Open-ILS/web/templates/default/vandelay/inc/profiles.tt2 b/Open-ILS/web/templates/default/vandelay/inc/profiles.tt2 index d5f2bcd9d1..5bd4d4daab 100644 --- a/Open-ILS/web/templates/default/vandelay/inc/profiles.tt2 +++ b/Open-ILS/web/templates/default/vandelay/inc/profiles.tt2 @@ -1,6 +1,4 @@ - - -
+
Overlay / Merge Profiles
diff --git a/Open-ILS/web/templates/default/vandelay/inc/upload.tt2 b/Open-ILS/web/templates/default/vandelay/inc/upload.tt2 index 8691c4dce2..8ab86874bc 100644 --- a/Open-ILS/web/templates/default/vandelay/inc/upload.tt2 +++ b/Open-ILS/web/templates/default/vandelay/inc/upload.tt2 @@ -19,7 +19,7 @@ &vandelay.add.existing.queue; - @@ -36,6 +36,18 @@ + &vandelay.auto.import.auto_overlay_1match; + + + + + + &vandelay.auto.import.merge_profile; + +
+ + + Import Attached Holdings -- 2.11.0