details:   /erp/devel/pi/rev/376b12312af4
changeset: 11538:376b12312af4
user:      Martin Taal <martin.taal <at> openbravo.com>
date:      Thu Apr 07 11:34:53 2011 +0200
summary:   Related to issue 16603: Autosave disabled doesn't work on grid

diffstat:

 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-grid.js
 |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r fc564c1ef2e1 -r 376b12312af4 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-grid.js
--- 
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-grid.js
  Thu Apr 07 11:07:00 2011 +0200
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-grid.js
  Thu Apr 07 11:34:53 2011 +0200
@@ -1475,9 +1475,12 @@
   cellEditEnd: function (editCompletionEvent, newValue, ficCallDone, 
autoSaveDone) {
     var rowNum = this.getEditRow(), colNum = this.getEditCol();
     var editForm = this.getEditForm(), focusItem = editForm.getFocusItem();
-    var nextEditCell = this.getNextEditCell(rowNum, colNum, 
editCompletionEvent);
+    // 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 (!autoSaveDone && newRow && (this.getEditForm().hasChanged || 
this.getEditForm().isNew)) {
+    // the enter key saves anyway, so no autosave needed
+    var enterKey = editCompletionEvent === 'enter';
+    if (!enterKey && !autoSaveDone && newRow && (this.getEditForm().hasChanged 
|| this.getEditForm().isNew)) {
       var actionObject = {
           target: this,
           method: this.cellEditEnd,

------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to