details: /erp/devel/pi/rev/4d626fb311f6
changeset: 9814:4d626fb311f6
user: Martin Taal <martin.taal <at> openbravo.com>
date: Fri Jan 14 13:27:50 2011 +0100
summary: Default edit view if no records there, stays now in grid mode
diffstat:
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-standard-view.js
| 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diffs (20 lines):
diff -r e57b3dee044b -r 4d626fb311f6
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-standard-view.js
---
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-standard-view.js
Fri Jan 14 13:09:19 2011 +0100
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-standard-view.js
Fri Jan 14 13:27:50 2011 +0100
@@ -580,13 +580,11 @@
// open form in edit mode
if (record) {
this.editRecord(record, preventFocus);
- } else if (!this.viewGrid.data || this.viewGrid.data.getLength() === 0) {
- // purposely not passing a record, to open new mode
- this.editRecord(null, preventFocus);
- } else {
+ } else if (!this.viewGrid.data && this.viewGrid.data.getLength() > 0) {
// edit the first record
this.editRecord(this.viewGrid.getRecord(0), preventFocus);
- }
+ }
+ // in other cases just show grid
},
// ** {{{ switchFormGridVisibility }}} **
------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand
malware threats, the impact they can have on your business, and how you
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits