[open-ils-commits] r10453 -
trunk/Open-ILS/xul/staff_client/server/admin
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Aug 26 15:41:42 EDT 2008
Author: erickson
Date: 2008-08-26 15:41:38 -0400 (Tue, 26 Aug 2008)
New Revision: 10453
Modified:
trunk/Open-ILS/xul/staff_client/server/admin/adminlib.js
Log:
using batch version of perm org fetcher. added onload callback option
Modified: trunk/Open-ILS/xul/staff_client/server/admin/adminlib.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/admin/adminlib.js 2008-08-26 18:13:28 UTC (rev 10452)
+++ trunk/Open-ILS/xul/staff_client/server/admin/adminlib.js 2008-08-26 19:41:38 UTC (rev 10453)
@@ -59,15 +59,19 @@
return orgs;
}
-function fetchHighestWorkPermOrgs(session, userId, perms) {
- for(var i = 0; i < perms.length; i++) {
- var perm = perms[i];
- var req = new RemoteRequest(
- 'open-ils.actor',
- 'open-ils.actor.user.work_perm.highest_org_set',
- session, perm);
+function fetchHighestWorkPermOrgs(session, userId, perms, onload) {
+ var req = new RemoteRequest(
+ 'open-ils.actor',
+ 'open-ils.actor.user.work_perm.highest_org_set.batch',
+ session, perms);
+ if(onload) {
+ req.setCompleteCallback(function(r){
+ onload(OILS_WORK_PERMS = r.getResultObject());
+ });
+ req.send()
+ } else {
req.send(true);
- OILS_WORK_PERMS[perm] = req.getResultObject();
+ return OILS_WORK_PERMS = req.getResultObject();
}
}
More information about the open-ils-commits
mailing list