[open-ils-commits] r11309 - trunk/Open-ILS/web/js/ui/default/conify/global/config
svn at svn.open-ils.org
svn at svn.open-ils.org
Sun Nov 23 10:48:35 EST 2008
Author: erickson
Date: 2008-11-23 10:48:33 -0500 (Sun, 23 Nov 2008)
New Revision: 11309
Modified:
trunk/Open-ILS/web/js/ui/default/conify/global/config/standing_penalty.js
Log:
implemented create
Modified: trunk/Open-ILS/web/js/ui/default/conify/global/config/standing_penalty.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/conify/global/config/standing_penalty.js 2008-11-23 15:33:12 UTC (rev 11308)
+++ trunk/Open-ILS/web/js/ui/default/conify/global/config/standing_penalty.js 2008-11-23 15:48:33 UTC (rev 11309)
@@ -12,6 +12,13 @@
params: [openils.User.authtoken, {id:{'!=':null}}],
oncomplete: function(r) {
if(spList = openils.Util.readResponse(r)) {
+ spList = spList.sort(
+ function(a, b) {
+ if(a.id() > b.id())
+ return 1;
+ return -1;
+ }
+ );
var store = new dojo.data.ItemFileReadStore({data:csp.toStoreData(spList)});
spGrid.setStore(store);
spGrid.render();
@@ -27,15 +34,20 @@
var penalty = new csp();
penalty.name(args.name);
penalty.label(args.label);
- penalty.block_list(args.block_list);
+ var str = '';
+ for(var idx in args.block_list)
+ str += args.block_list[idx] + '|';
+ str = str.replace(/\|$/, '');
+ penalty.block_list(str || null);
+
fieldmapper.standardRequest(
['open-ils.permacrud', 'open-ils.permacrud.create.csp'],
{ async: true,
params: [openils.User.authtoken, penalty],
oncomplete: function(r) {
if(new String(openils.Util.readResponse(r)) != '0')
- buildSPGrid();
+ spBuildGrid();
}
}
);
More information about the open-ils-commits
mailing list