BUG 11086 "Rows are being ignored after adding them next to an empty

row" SOLVED

-When you try to add a row into a pmTable, if you leave an empty row the
next added rows are being ignored and not saved.
-Solved, The final user cant leave a row without at least the primary
keys columns filled up, to be saved and if by accident the user leaves
an empty row the aplication shows up an error message.
This commit is contained in:
marcelo
2013-04-15 16:06:15 -04:00
parent 9bc2c87bd0
commit 82425aad5a

View File

@@ -398,7 +398,13 @@ NewPMTableRow = function(){
var row = new PMRow(new props);
len = infoGrid.getStore().data.length;
if (len>0) {
if (infoGrid.store.getAt(len-1).data[tableDef.FIELDS[0].FLD_NAME]=="") {
var emptyrow=0;
for (var i = 0; i < tableDef.FIELDS.length; i++) {
if (infoGrid.store.getAt(len-1).data[tableDef.FIELDS[i].FLD_NAME]=="") {
emptyrow++;
};
};
if (emptyrow==tableDef.FIELDS.length) {
PMExt.error( _('ID_ERROR'), _('ID_EMPTY_ROW'));
store.load();
} else{