details: /erp/devel/pi/rev/6662da65df17
changeset: 10839:6662da65df17
user: Martin Taal <martin.taal <at> openbravo.com>
date: Wed Feb 23 08:41:26 2011 +0100
summary: Prevent focus on disabled fields when tabbing
diffstat:
modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js
| 11 +++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diffs (27 lines):
diff -r db1c1f24c710 -r 6662da65df17
modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js
---
a/modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js
Wed Feb 23 08:27:24 2011 +0100
+++
b/modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js
Wed Feb 23 08:41:26 2011 +0100
@@ -81,13 +81,22 @@
return;
},
+ setDisabled : function (disabled) {
+ var ret = this.Super('setDisabled', arguments);
+ this.canFocus = !disabled;
+ return ret;
+ },
+
isDisabled: function(){
// disabled if the property can not be updated and the form or record is
new
// explicitly comparing with false as it is only set for edit form fields
if (this.updatable === false && !(this.form.isNew ||
this.form.getValue('_new'))) {
+ this.canFocus = false;
return true;
}
- return this.form.readOnly || this.disabled || this.form.allItemsDisabled;
+ var disabled = this.form.readOnly || this.disabled ||
this.form.allItemsDisabled;
+ this.canFocus = !disabled;
+ return disabled;
},
// return all relevant focus condition
------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in
Real-Time with Splunk. Collect, index and harness all the fast moving IT data
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business
insights. http://p.sf.net/sfu/splunk-dev2dev
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits