From 82425aad5a430056e0804db0530bc509c99b1867 Mon Sep 17 00:00:00 2001 From: marcelo Date: Mon, 15 Apr 2013 16:06:15 -0400 Subject: [PATCH] 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. --- workflow/engine/templates/pmTables/data.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/workflow/engine/templates/pmTables/data.js b/workflow/engine/templates/pmTables/data.js index 64a207037..b2976e40e 100755 --- a/workflow/engine/templates/pmTables/data.js +++ b/workflow/engine/templates/pmTables/data.js @@ -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{