From: Bill Erickson Date: Tue, 31 Jan 2012 15:01:01 +0000 (-0500) Subject: ACQ+Vandelay ACQ Records in vandelay queue selector X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=23b04db5a14931a395fc505be061c1c8a7784c68;p=contrib%2FConifer.git 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 --- 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); }