From a61dc480ed223132191eee85ab10cf508ffb15fb Mon Sep 17 00:00:00 2001 From: erickson Date: Fri, 26 Sep 2008 20:19:19 +0000 Subject: [PATCH] added ability to only fetch/dislplay non-imported recs in queue retrieval. hiding page footer for now, since it seems to be causing probs with the bottom grid scroll git-svn-id: svn://svn.open-ils.org/ILS/trunk@10713 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../src/perlmods/OpenILS/Application/Vandelay.pm | 6 ++++-- Open-ILS/web/vandelay/vandelay.js | 13 +++++++------ Open-ILS/web/vandelay/vandelay.xml | 6 ++++++ 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm b/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm index 7d150ea705..6842f81406 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm @@ -342,14 +342,16 @@ sub retrieve_queue { my $retrieve = ($type eq 'bib') ? 'retrieve_vandelay_queued_bib_record' : 'retrieve_vandelay_queued_authority_record'; + my $filter = ($$options{non_imported}) ? {import_time => undef} : {}; + my $record_ids; if($self->api_name =~ /matches/) { # fetch only matched records - $record_ids = queued_records_with_matches($e, $type, $queue_id, $limit, $offset); + $record_ids = queued_records_with_matches($e, $type, $queue_id, $limit, $offset, $filter); } else { # fetch all queue records $record_ids = $e->$search([ - {queue => $queue_id}, + {queue => $queue_id, %$filter}, {order_by => {$class => 'id'}, limit => $limit, offset => $offset} ], {idlist => 1} diff --git a/Open-ILS/web/vandelay/vandelay.js b/Open-ILS/web/vandelay/vandelay.js index 2e051183b5..9878c004ab 100644 --- a/Open-ILS/web/vandelay/vandelay.js +++ b/Open-ILS/web/vandelay/vandelay.js @@ -266,6 +266,11 @@ function retrieveQueuedRecords(type, queueId, onload) { var method = 'open-ils.vandelay.'+type+'_queue.records.retrieve.atomic'; if(vlQueueGridShowMatches.checked) method = method.replace('records', 'records.matches'); + var params = [authtoken, queueId, {clear_marc: 1, offset: offset, limit: limit}]; + + if(vlQueueGridShowNonImport.checked) + params[2].non_imported = 1; + var limit = parseInt(vlQueueDisplayLimit.getValue()); var offset = limit * parseInt(vlQueueDisplayPage.getValue()-1); @@ -273,12 +278,8 @@ function retrieveQueuedRecords(type, queueId, onload) { fieldmapper.standardRequest( ['open-ils.vandelay', method], { async: true, - params: [authtoken, queueId, - { clear_marc: 1, - offset: offset, - limit: limit - } - ], + params: params, + /* intermittent bug in streaming, multipart requests prevents use of onreponse for now... onresponse: function(r) { var rec = r.recv().content(); diff --git a/Open-ILS/web/vandelay/vandelay.xml b/Open-ILS/web/vandelay/vandelay.xml index fc1fd38ec1..e591eaf3b8 100644 --- a/Open-ILS/web/vandelay/vandelay.xml +++ b/Open-ILS/web/vandelay/vandelay.xml @@ -172,6 +172,10 @@ Limit to Collision Matches + + Limit to Non-Imported Records + + Results Per Page