details: /erp/devel/pi/rev/bb390f3dfe3e
changeset: 11469:bb390f3dfe3e
user: Martin Taal <martin.taal <at> openbravo.com>
date: Tue Apr 05 09:26:00 2011 +0200
summary: Related to issue 16498: First focus is not working in grid view
details: /erp/devel/pi/rev/2793bd38556a
changeset: 11470:2793bd38556a
user: Martin Taal <martin.taal <at> openbravo.com>
date: Tue Apr 05 09:26:44 2011 +0200
summary: Fixes issue 16509: Grab the horizontal scroll bar, lose the edit mode
diffstat:
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-form.js
| 12 ++++++---
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-grid.js
| 6 ++++-
2 files changed, 13 insertions(+), 5 deletions(-)
diffs (51 lines):
diff -r f38090dd9112 -r 2793bd38556a
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-form.js
---
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-form.js
Mon Apr 04 22:56:16 2011 +0200
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-form.js
Tue Apr 05 09:26:44 2011 +0200
@@ -241,11 +241,15 @@
}
},
- // reset the focus item to the first item which can get focus
resetFocusItem: function() {
var items = this.getItems(), length = items.length, item;
- // used when double clicking a specific cell in a record
+ var errorFld = this.getFirstErrorItem();
+ if (errorFld) {
+ this.setFocusInItem(errorFld, true);
+ return;
+ }
+
if (this.forceFocusedField) {
item = this.getItem(this.forceFocusedField);
if(item && item.getCanFocus()) {
@@ -1006,11 +1010,11 @@
},
getFirstErrorItem: function() {
- var flds = this.getFields();
+ var flds = this.getFields(), errs = this.getErrors();
if (flds.length) {
var length = flds.length;
for (i = 0; i < length; i++) {
- if (flds[i].getErrors()) {
+ if (flds[i].getErrors() || errs[flds[i].name]) {
return flds[i];
}
}
diff -r f38090dd9112 -r 2793bd38556a
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
Mon Apr 04 22:56:16 2011 +0200
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-grid.js
Tue Apr 05 09:26:44 2011 +0200
@@ -138,7 +138,11 @@
recordBaseStyleProperty: '_recordStyle',
- modalEditing: true,
+ // set to false because of this:
https://issues.openbravo.com/view.php?id=16509
+ modalEditing: false,
+ // set to true because if not all cols are drawn then when doing inline
editing
+ // errors were reported for undrawn columns
+ showAllColumns: true,
//showGridSummary: true,
timeFormatter: 'to24HourTime',
------------------------------------------------------------------------------
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