details: /erp/devel/pi/rev/daca5e78b6b5
changeset: 9883:daca5e78b6b5
user: Martin Taal <martin.taal <at> openbravo.com>
date: Mon Jan 17 22:41:30 2011 +0100
summary: solved focus issues
details: /erp/devel/pi/rev/5b3e9f9cbbce
changeset: 9884:5b3e9f9cbbce
user: Martin Taal <martin.taal <at> openbravo.com>
date: Mon Jan 17 22:41:44 2011 +0100
summary: Styles for popup text area
details: /erp/devel/pi/rev/3e24c5bfa4bb
changeset: 9885:3e24c5bfa4bb
user: Martin Taal <martin.taal <at> openbravo.com>
date: Mon Jan 17 22:41:57 2011 +0100
summary: Solved line ending
diffstat:
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-form.js
| 13 +-
modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.application/ob-form-styles.js
| 7 +
modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js
| 192 +++++-----
3 files changed, 111 insertions(+), 101 deletions(-)
diffs (271 lines):
diff -r 053a40038814 -r 3e24c5bfa4bb
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 Jan 17 22:38:02 2011 +0100
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-form.js
Mon Jan 17 22:41:57 2011 +0100
@@ -62,6 +62,8 @@
editRecord: function(record, preventFocus){
this.hasChanged = false;
+
+ this.setNewState(false);
// focus is done automatically, prevent the focus event if needed
// the focus event will set the active view
@@ -75,12 +77,12 @@
this.clearErrors();
this.retrieveInitialValues(false);
- this.setNewState(false);
this.view.messageBar.hide();
this.resetFocusItem();
- this.focus();
-
+ if (!preventFocus) {
+ this.focus();
+ }
return ret;
},
@@ -90,6 +92,8 @@
this.ignoreFirstFocusEvent = preventFocus;
this.hasChanged = false;
+
+ this.setNewState(true);
// disable relevant buttons
this.view.toolBar.setLeftMemberDisabled(isc.OBToolbar.TYPE_REFRESH, true);
@@ -101,12 +105,10 @@
this.clearErrors();
this.retrieveInitialValues(true);
- this.setNewState(true);
this.resetFocusItem();
this.focus();
this.view.messageBar.hide();
-
return ret;
},
@@ -257,6 +259,7 @@
} else {
this.readOnly = false;
}
+ this.focus();
},
processColumnValue: function(columnName, columnValue){
diff -r 053a40038814 -r 3e24c5bfa4bb
modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.application/ob-form-styles.js
---
a/modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.application/ob-form-styles.js
Mon Jan 17 22:38:02 2011 +0100
+++
b/modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.application/ob-form-styles.js
Mon Jan 17 22:41:57 2011 +0100
@@ -58,6 +58,13 @@
textBoxStyle: 'OBFormFieldInput'
});
+isc.OBPopUpTextAreaItem.addProperties({
+ errorOrientation: 'left',
+ cellStyle: 'OBFormField',
+ titleStyle: 'OBFormFieldLabel',
+ textBoxStyle: 'OBFormFieldInput'
+});
+
OB.DefaultPickListStyleProperties = {
cellStyle: 'OBFormField',
titleStyle: 'OBFormFieldLabel',
diff -r 053a40038814 -r 3e24c5bfa4bb
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
Mon Jan 17 22:38:02 2011 +0100
+++
b/modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js
Mon Jan 17 22:41:57 2011 +0100
@@ -1,96 +1,96 @@
-/*
- *************************************************************************
- * The contents of this file are subject to the Openbravo Public License
- * Version 1.1 (the "License"), being the Mozilla Public License
- * Version 1.1 with a permitted attribution clause; you may not use this
- * file except in compliance with the License. You may obtain a copy of
- * the License at http://www.openbravo.com/legal/license.html
- * Software distributed under the License is distributed on an "AS IS"
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
- * License for the specific language governing rights and limitations
- * under the License.
- * The Original Code is Openbravo ERP.
- * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2011 Openbravo SLU
- * All Rights Reserved.
- * Contributor(s): ______________________________________.
- ************************************************************************
- */
-// This file contains direct overrides of Smartclient types.
-// Normally we introduce new subtypes of Smartclient types. However for
-// some cases it makes sense to directly set properties on top Smartclient
-// types. This is done in this file.
-
-// is placed here because the smartclient labels are loaded just after the
smartclient
-// core
-isc.setAutoDraw(false);
-
-isc.FormItem.addProperties({
- titleClick: function(form, item){
- item.focusInItem();
- },
-
- changed: function(){
- var ret = this.Super('changed', arguments);
- this._hasChanged = true;
- return ret;
- },
-
- focus: function(form, item){
- if (form.view) {
- form.view.lastFocusedItem = this;
- form.view.setAsActiveView();
- } else if (form.grid) {
- if (form.grid.view) {
- form.grid.view.lastFocusedItem = this;
- form.grid.view.setAsActiveView();
- } else if (isc.isA.RecordEditor(form.grid) && form.grid.sourceWidget &&
form.grid.sourceWidget.view) {
- form.grid.sourceWidget.view.lastFocusedItem = this;
- form.grid.sourceWidget.view.setAsActiveView();
- }
- }
- },
-
- blur: function(form, item){
- if (form && form.handleItemChange) {
- form.handleItemChange(this);
- }
- this._hasChanged = false;
- if (this._originalBlur) {
- return this._originalBlur(form, item);
- }
- return;
- },
-
- isDisabled: function(){
- return this.form.readOnly;
- },
-
- // return all relevant focus condition
- isFocusable: function(){
- return this.canFocus && this.isDrawn() &&
- this.isVisible() &&
- !this.isDisabled();
- }
-});
-
-isc.Canvas.addProperties({
- // let focuschanged go up to the parent, or handle it here
- focusChanged: function(hasFocus){
- if (hasFocus && this.view && this.view.setAsActiveView) {
- // is done when opening a form
- this.view.setAsActiveView();
- return;
- }
-
- if (this.parentElement && this.parentElement.focusChanged) {
- this.parentElement.focusChanged(hasFocus);
- }
- }
-});
-
-// overridden to never show a prompt. A prompt can be created manually
-// when overriding for example the DataSource (see the OBStandardView).
-isc.RPCManager.showPrompt = false;
-isc.RPCManager.neverShowPrompt = true;
-
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo Public License
+ * Version 1.1 (the "License"), being the Mozilla Public License
+ * Version 1.1 with a permitted attribution clause; you may not use this
+ * file except in compliance with the License. You may obtain a copy of
+ * the License at http://www.openbravo.com/legal/license.html
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo SLU
+ * All portions are Copyright (C) 2011 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s): ______________________________________.
+ ************************************************************************
+ */
+// This file contains direct overrides of Smartclient types.
+// Normally we introduce new subtypes of Smartclient types. However for
+// some cases it makes sense to directly set properties on top Smartclient
+// types. This is done in this file.
+
+// is placed here because the smartclient labels are loaded just after the
smartclient
+// core
+isc.setAutoDraw(false);
+
+isc.FormItem.addProperties({
+ titleClick: function(form, item){
+ item.focusInItem();
+ },
+
+ changed: function(){
+ var ret = this.Super('changed', arguments);
+ this._hasChanged = true;
+ return ret;
+ },
+
+ focus: function(form, item){
+ if (form.view) {
+ form.view.lastFocusedItem = this;
+ form.view.setAsActiveView();
+ } else if (form.grid) {
+ if (form.grid.view) {
+ form.grid.view.lastFocusedItem = this;
+ form.grid.view.setAsActiveView();
+ } else if (isc.isA.RecordEditor(form.grid) && form.grid.sourceWidget &&
form.grid.sourceWidget.view) {
+ form.grid.sourceWidget.view.lastFocusedItem = this;
+ form.grid.sourceWidget.view.setAsActiveView();
+ }
+ }
+ },
+
+ blur: function(form, item){
+ if (form && form.handleItemChange) {
+ form.handleItemChange(this);
+ }
+ this._hasChanged = false;
+ if (this._originalBlur) {
+ return this._originalBlur(form, item);
+ }
+ return;
+ },
+
+ isDisabled: function(){
+ return this.form.readOnly || this.disabled;
+ },
+
+ // return all relevant focus condition
+ isFocusable: function(){
+ return this.canFocus && this.isDrawn() &&
+ this.isVisible() &&
+ !this.isDisabled();
+ }
+});
+
+isc.Canvas.addProperties({
+ // let focuschanged go up to the parent, or handle it here
+ focusChanged: function(hasFocus){
+ if (hasFocus && this.view && this.view.setAsActiveView) {
+ // is done when opening a form
+ this.view.setAsActiveView();
+ return;
+ }
+
+ if (this.parentElement && this.parentElement.focusChanged) {
+ this.parentElement.focusChanged(hasFocus);
+ }
+ }
+});
+
+// overridden to never show a prompt. A prompt can be created manually
+// when overriding for example the DataSource (see the OBStandardView).
+isc.RPCManager.showPrompt = false;
+isc.RPCManager.neverShowPrompt = true;
+
------------------------------------------------------------------------------
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