[open-ils-commits] r11679 - trunk/Open-ILS/web/js/ui/default/conify/global/permission
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Dec 26 09:01:04 EST 2008
Author: erickson
Date: 2008-12-26 09:01:03 -0500 (Fri, 26 Dec 2008)
New Revision: 11679
Modified:
trunk/Open-ILS/web/js/ui/default/conify/global/permission/grp_penalty_threshold.js
Log:
do the sorting on the server
Modified: trunk/Open-ILS/web/js/ui/default/conify/global/permission/grp_penalty_threshold.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/conify/global/permission/grp_penalty_threshold.js 2008-12-23 22:22:36 UTC (rev 11678)
+++ trunk/Open-ILS/web/js/ui/default/conify/global/permission/grp_penalty_threshold.js 2008-12-26 14:01:03 UTC (rev 11679)
@@ -92,19 +92,11 @@
fieldmapper.standardRequest(
['open-ils.pcrud', 'open-ils.pcrud.search.csp.atomic'],
{ async: true,
- params: [openils.User.authtoken, {id:{'<':100}}],
+ params: [openils.User.authtoken, {id:{'<':100}}, {order_by:{csp:'id'}}],
oncomplete: function(r) {
if(list = openils.Util.readResponse(r, false, true)) {
- list = list.sort(
- function(a, b) {
- // why not take this opportunity to do some other stuff? ;)
- GPT.penaltyMap[a.id()] = a;
- GPT.penaltyMap[b.id()] = b;
- if(a.id() > b.id())
- return 1;
- return -1;
- }
- );
+ for(var idx in list)
+ GPT.penaltyMap[list[idx].id()] = list[idx];
GPT.standingPenalties = list;
if(onload) onload(list);
}
More information about the open-ils-commits
mailing list