From fafd7a2465b4b5f4f2d3355e2c0428a65f0ee83d Mon Sep 17 00:00:00 2001 From: erickson Date: Wed, 17 Sep 2008 20:40:15 +0000 Subject: [PATCH] added paging to queued recs grid git-svn-id: svn://svn.open-ils.org/ILS/trunk@10626 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/vandelay/vandelay.html | 34 ++++++++++++++++++++++++----- Open-ILS/web/vandelay/vandelay.js | 12 ++++++++-- 2 files changed, 38 insertions(+), 8 deletions(-) diff --git a/Open-ILS/web/vandelay/vandelay.html b/Open-ILS/web/vandelay/vandelay.html index 0ea9811494..a2c7dcd115 100644 --- a/Open-ILS/web/vandelay/vandelay.html +++ b/Open-ILS/web/vandelay/vandelay.html @@ -47,7 +47,7 @@ border: 1px solid red; } - + @@ -143,11 +143,33 @@ }
- - - - Only show records with possible matches + + + +
+ + + + + + « Previous Page + + + Next Page » + + Only show possible matches + + Page Size + Page + +
diff --git a/Open-ILS/web/vandelay/vandelay.js b/Open-ILS/web/vandelay/vandelay.js index 6f18cc4e90..ff52073da7 100644 --- a/Open-ILS/web/vandelay/vandelay.js +++ b/Open-ILS/web/vandelay/vandelay.js @@ -238,10 +238,18 @@ function retrieveQueuedRecords(type, queueId, onload) { if(vlQueueGridShowMatches.checked) method = method.replace('records', 'records.matches'); + var limit = parseInt(vlQueueDisplayLimit.getValue()); + var offset = limit * parseInt(vlQueueDisplayPage.getValue()-1); + fieldmapper.standardRequest( ['open-ils.vandelay', method], { async: true, - params: [authtoken, queueId, {clear_marc:1}], + params: [authtoken, queueId, + { clear_marc: 1, + offset: offset, + limit: limit + } + ], /* intermittent bug in streaming, multipart requests prevents use of onreponse for now... onresponse: function(r) { var rec = r.recv().content(); @@ -457,7 +465,7 @@ function buildRecordGrid(type) { currentOverlayRecordsMap = {}; - if(queuedRecords.length == 0) { + if(queuedRecords.length == 0 && vlQueueDisplayPage.getValue() == 1) { dojo.style(dojo.byId('vl-queue-no-records'), 'display', 'block'); dojo.style(dojo.byId('vl-queue-div-grid'), 'display', 'none'); return; -- 2.43.2