[open-ils-commits] r16344 - in trunk/Open-ILS: src/perlmods/OpenILS/Application/Acq web/js/ui/default/acq/picklist web/templates/default/acq/picklist (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Apr 29 11:14:22 EDT 2010
Author: erickson
Date: 2010-04-29 11:14:20 -0400 (Thu, 29 Apr 2010)
New Revision: 16344
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Acq/Picklist.pm
trunk/Open-ILS/web/js/ui/default/acq/picklist/view_list.js
trunk/Open-ILS/web/templates/default/acq/picklist/list.tt2
Log:
added paging to user picklist retrieval/display
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Acq/Picklist.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Acq/Picklist.pm 2010-04-29 14:17:20 UTC (rev 16343)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Acq/Picklist.pm 2010-04-29 15:14:20 UTC (rev 16344)
@@ -193,11 +193,18 @@
my($self, $conn, $auth, $options) = @_;
my $e = new_editor(authtoken=>$auth);
return $e->die_event unless $e->checkauth;
+ $options ||= {};
# don't grab the PL with name == "", because that is the designated temporary picklist
my $list = $e->search_acq_picklist([
- {owner=>$e->requestor->id, name=>{'!='=>''}},
- {order_by => {acqpl => 'name'}}
+ {
+ owner=>$e->requestor->id,
+ name=>{'!='=>''}
+ }, {
+ order_by => {acqpl => 'name'},
+ limit => $$options{limit} || 10,
+ offset => $$options{offset} || 0,
+ }
],
{idlist=>1}
);
Modified: trunk/Open-ILS/web/js/ui/default/acq/picklist/view_list.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/acq/picklist/view_list.js 2010-04-29 14:17:20 UTC (rev 16343)
+++ trunk/Open-ILS/web/js/ui/default/acq/picklist/view_list.js 2010-04-29 15:14:20 UTC (rev 16344)
@@ -15,9 +15,13 @@
var plCache = {};
function loadGrid() {
-
dojo.connect(plMergeDialog, 'onOpen', function(){loadLeadPlSelector();});
+ plListGrid.dataLoader = gridDataLoader;
+ gridDataLoader();
+}
+function gridDataLoader() {
+
var method = 'open-ils.acq.picklist.user.retrieve';
if(listAll)
method = method.replace(/user/, 'user.all');
@@ -25,13 +29,25 @@
fieldmapper.standardRequest(
['open-ils.acq', method],
{ async: true,
- params: [openils.User.authtoken, {flesh_lineitem_count:1, flesh_owner:1}],
+ params: [
+ openils.User.authtoken,
+ {
+ flesh_lineitem_count:1,
+ flesh_owner:1,
+ offset : plListGrid.displayOffset,
+ limit : plListGrid.displayLimit,
+ }
+ ],
onresponse : function(r) {
var pl = openils.Util.readResponse(r);
- if(!pl) return;
- plCache[pl.id()] = pl;
- plListGrid.store.newItem(acqpl.toStoreItem(pl));
+ if(pl) {
+ plCache[pl.id()] = pl;
+ plListGrid.store.newItem(acqpl.toStoreItem(pl));
+ }
},
+ oncomplete : function() {
+ plListGrid.hideLoadProgressIndicator();
+ }
}
);
}
Modified: trunk/Open-ILS/web/templates/default/acq/picklist/list.tt2
===================================================================
--- trunk/Open-ILS/web/templates/default/acq/picklist/list.tt2 2010-04-29 14:17:20 UTC (rev 16343)
+++ trunk/Open-ILS/web/templates/default/acq/picklist/list.tt2 2010-04-29 15:14:20 UTC (rev 16344)
@@ -88,6 +88,7 @@
query="{id: '*'}"
defaultCellWidth='"auto"'
fmClass='acqpl'
+ showPaginator='true'
editOnEnter='true'>
<thead>
<tr>
More information about the open-ils-commits
mailing list