[open-ils-commits] r10342 -
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/common
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Aug 11 22:16:23 EDT 2008
Author: djfiander
Date: 2008-08-11 22:16:22 -0400 (Mon, 11 Aug 2008)
New Revision: 10342
Modified:
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/common/jubgrid.js
Log:
Can't delete a lineitem (JUB) unless it's still in state
'new'. This should be checked in the backend.
Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/common/jubgrid.js
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/common/jubgrid.js 2008-08-11 23:01:17 UTC (rev 10341)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/common/jubgrid.js 2008-08-12 02:16:22 UTC (rev 10342)
@@ -210,8 +210,13 @@
var rowIdx = selected[i];
var jubid = JUBGrid.jubGrid.model.getRow(rowIdx).id;
if(jubid == id) {
- deleteMe.push(lineitems[id]);
- deleted = true;
+ if (lineitems[id].state() == 'new') {
+ deleteMe.push(lineitems[id]);
+ deleted = true;
+ } else {
+ alert("Can not delete line item "+id+
+ ": item is "+lineitems[id].state());
+ }
}
}
if(!deleted)
More information about the open-ils-commits
mailing list