details: https://code.openbravo.com/erp/devel/main/rev/13d387213fdd
changeset: 15716:13d387213fdd
user: Augusto Mauch <augusto.mauch <at> openbravo.com>
date: Thu Mar 29 16:54:24 2012 +0200
summary: Fixes issue 20147: A new record is created in the grid when pushing
the enter key
A change (changeset 2e1947ca8bbc) introduced for trying to fix issue 19830
prevented a new line from being created when the user pushed the enter key
while editing the last reco
rd in the grid. This change has been reverted, and the functionality is working
again.
This change does not modify the status of issue 19830, because the changeset
that has been reverted only solved part of the problem.
diffstat:
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
| 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diffs (13 lines):
diff -r 41f372e57320 -r 13d387213fdd
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
---
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
Wed Mar 28 13:25:08 2012 +0200
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
Thu Mar 29 16:54:24 2012 +0200
@@ -2021,7 +2021,8 @@
// sometimes rowNum and colnum are not set, then don't compute the next
cell
var nextEditCell = ((rowNum || rowNum === 0) && (colNum || colNum === 0) ?
this.getNextEditCell(rowNum, colNum, editCompletionEvent) : null);
var newRow = nextEditCell && nextEditCell[0] !== rowNum;
- if (this.view.standardWindow.isAutoSaveEnabled() && !autoSaveDone &&
newRow && (editForm.hasChanged || editForm.isNew)) {
+ var enterKey = editCompletionEvent === 'enter';
+ if (this.view.standardWindow.isAutoSaveEnabled() && !enterKey &&
!autoSaveDone && newRow && (editForm.hasChanged || editForm.isNew)) {
var actionObject = {
target: this,
method: this.cellEditEnd,
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits