From: erickson Date: Fri, 26 Dec 2008 14:01:03 +0000 (+0000) Subject: do the sorting on the server X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=a5c385db3a2e98e5619addae7291627a66705926;p=Evergreen.git do the sorting on the server git-svn-id: svn://svn.open-ils.org/ILS/trunk@11679 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/web/js/ui/default/conify/global/permission/grp_penalty_threshold.js b/Open-ILS/web/js/ui/default/conify/global/permission/grp_penalty_threshold.js index 260cd204c2..c9feb63375 100644 --- a/Open-ILS/web/js/ui/default/conify/global/permission/grp_penalty_threshold.js +++ b/Open-ILS/web/js/ui/default/conify/global/permission/grp_penalty_threshold.js @@ -92,19 +92,11 @@ var GPT = { 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); }