details: /erp/devel/main/rev/7fe376b442fd
changeset: 11596:7fe376b442fd
user: Juan Pablo Aroztegi <juanpablo.aroztegi <at> openbravo.com>
date: Fri Apr 22 23:28:37 2011 +0200
summary: Solve incorrect focus when moving to next row with arrow key, solved
wrong decl of local var
Committed and pushed on behalf of Martin Taal
diffstat:
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-grid.js
| 14 ++++++++-
1 files changed, 12 insertions(+), 2 deletions(-)
diffs (33 lines):
diff -r d5d54366eae7 -r 7fe376b442fd
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
Tue Apr 19 09:31:54 2011 +0200
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-grid.js
Fri Apr 22 23:28:37 2011 +0200
@@ -1268,10 +1268,11 @@
}
}
}
+
if (colNum || colNum === 0) {
- this.forceFocusColumn = this.getField(colNum).name;
+ this.forceFocusColumn = this.getField(colNum).name;
}
-
+
return this.Super('startEditing', [rowNum, colNum, suppressFocus, eCe,
suppressWarning]);
},
@@ -1529,6 +1530,15 @@
} else {
ret = this.Super('getNextEditCell', arguments);
}
+
+ // when moving between rows with the arrow keys, force the focus in the
correct
+ // column
+ if (ret && ret[0] !== rowNum && this.getField(colNum) &&
+ (editCompletionEvent === isc.ListGrid.UP_ARROW_KEYPRESS ||
+ editCompletionEvent ===
isc.ListGrid.DOWN_ARROW_KEYPRESS)) {
+ this.forceFocusColumn = this.getField(colNum).name;
+ }
+
delete this._inGetNextEditCell;
return ret;
},
------------------------------------------------------------------------------
Fulfilling the Lean Software Promise
Lean software platforms are now widely adopted and the benefits have been
demonstrated beyond question. Learn why your peers are replacing JEE
containers with lightweight application servers - and what you can gain
from the move. http://p.sf.net/sfu/vmware-sfemails
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits