From 23b04db5a14931a395fc505be061c1c8a7784c68 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Tue, 31 Jan 2012 10:01:01 -0500 Subject: [PATCH] ACQ+Vandelay ACQ Records in vandelay queue selector Adds a new type of record to select from the Vandelay queue selector. Selecting "Acquisitions Records" will show queues with type 'acq'. Selecting the existing "Bibliographic Records" selector will only show queues with queue_type 'bib' (i.e. non-acq queues). Signed-off-by: Bill Erickson Signed-off-by: Ben Shum --- .../src/templates/vandelay/inc/queueselect.tt2 | 1 + Open-ILS/web/js/ui/default/vandelay/vandelay.js | 23 ++++++++++++++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/templates/vandelay/inc/queueselect.tt2 b/Open-ILS/src/templates/vandelay/inc/queueselect.tt2 index e72633b044..91416c9f2c 100644 --- a/Open-ILS/src/templates/vandelay/inc/queueselect.tt2 +++ b/Open-ILS/src/templates/vandelay/inc/queueselect.tt2 @@ -6,6 +6,7 @@ diff --git a/Open-ILS/web/js/ui/default/vandelay/vandelay.js b/Open-ILS/web/js/ui/default/vandelay/vandelay.js index 24b2a0ddb5..c7ed37ce79 100644 --- a/Open-ILS/web/js/ui/default/vandelay/vandelay.js +++ b/Open-ILS/web/js/ui/default/vandelay/vandelay.js @@ -1354,7 +1354,26 @@ function batchUpload() { function vlFleshQueueSelect(selector, type) { - var data = (type == 'bib') ? vbq.toStoreData(allUserBibQueues) : vaq.toStoreData(allUserAuthQueues); + var data; + if (type == 'bib') { + var bibList = allUserBibQueues.filter( + function(q) { + return (q.queue_type() == 'bib'); + } + ); + data = vbq.toStoreData(bibList); + } else if (type == 'bib-acq') { + // ACQ queues are a special type of bib queue + var acqList = allUserBibQueues.filter( + function(q) { + return (q.queue_type() == 'acq'); + } + ); + data = vbq.toStoreData(acqList); + } else { + data = vaq.toStoreData(allUserAuthQueues); + } + selector.store = new dojo.data.ItemFileReadStore({data:data}); selector.setValue(null); selector.setDisplayedValue(''); @@ -1455,7 +1474,7 @@ function vlShowMatchSetEditor() { } function vlFetchQueueFromForm() { - currentType = vlQueueSelectType.getValue(); + currentType = vlQueueSelectType.attr('value').replace(/-.*/, ''); // trim bib-acq currentQueueId = vlQueueSelectQueueList.getValue(); retrieveQueuedRecords(currentType, currentQueueId, handleRetrieveRecords); } -- 2.11.0