[open-ils-commits] r11641 - trunk/Open-ILS/web/js/dojo/openils
svn at svn.open-ils.org
svn at svn.open-ils.org
Sat Dec 20 21:23:01 EST 2008
Author: miker
Date: 2008-12-20 21:23:00 -0500 (Sat, 20 Dec 2008)
New Revision: 11641
Modified:
trunk/Open-ILS/web/js/dojo/openils/PermaCrud.js
Log:
adding support for ordery_by and select in search and retrieveAll
Modified: trunk/Open-ILS/web/js/dojo/openils/PermaCrud.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/PermaCrud.js 2008-12-21 02:13:54 UTC (rev 11640)
+++ trunk/Open-ILS/web/js/dojo/openils/PermaCrud.js 2008-12-21 02:23:00 UTC (rev 11641)
@@ -90,10 +90,14 @@
retrieveAll : function ( fm_class /* Fieldmapper class hint */, opts /* Option hash */) {
var pkey = fieldmapper[fm_class].Indentifier;
+ var order_by = {};
+ if (opts.order_by) order_by.order_by = opts.order_by;
+ if (opts.select) order_by.select = opts.select;
+
var req_hash = dojo.mixin(
opts,
{ method : 'open-ils.pcrud.search.' + fm_class + '.atomic',
- params : [ this.auth(), { fieldmapper[fm_class].Indentifier : { '!=' : null } } ]
+ params : [ this.auth(), { fieldmapper[fm_class].Indentifier : { '!=' : null } }, order_by ]
}
);
@@ -114,10 +118,14 @@
search : function ( fm_class /* Fieldmapper class hint */, search /* Fieldmapper query object */, opts /* Option hash */) {
var pkey = fieldmapper[fm_class].Indentifier;
+ var order_by = {};
+ if (opts.order_by) order_by.order_by = opts.order_by;
+ if (opts.select) order_by.select = opts.select;
+
var req_hash = dojo.mixin(
opts,
{ method : 'open-ils.pcrud.search.' + fm_class + '.atomic',
- params : [ this.auth(), search ]
+ params : [ this.auth(), search, order_by ]
}
);
More information about the open-ils-commits
mailing list