details: /erp/devel/pi/rev/b8dc2d47ba1d
changeset: 9822:b8dc2d47ba1d
user: Martin Taal <martin.taal <at> openbravo.com>
date: Fri Jan 14 20:00:57 2011 +0100
summary: Also allow foreign key column to be autoexpand
details: /erp/devel/pi/rev/d6490b1bfcc1
changeset: 9823:d6490b1bfcc1
user: Martin Taal <martin.taal <at> openbravo.com>
date: Fri Jan 14 20:02:03 2011 +0100
summary: Set monday as first day of week
details: /erp/devel/pi/rev/420381a59106
changeset: 9824:420381a59106
user: Martin Taal <martin.taal <at> openbravo.com>
date: Fri Jan 14 20:02:42 2011 +0100
summary: Prevent edit view opening if no records present
details: /erp/devel/pi/rev/e7886363d071
changeset: 9825:e7886363d071
user: Martin Taal <martin.taal <at> openbravo.com>
date: Fri Jan 14 20:03:38 2011 +0100
summary: Aligned picker icon to the combo
diffstat:
modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewGridComponent.java
| 4 +-
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-formitem-widgets.js
| 4 +
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-standard-view.js
| 24
++++-----
modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js
| 2 +-
modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.userinterface.selector/ob-selector-item-styles.js
| 7 +-
5 files changed, 21 insertions(+), 20 deletions(-)
diffs (144 lines):
diff -r 6b16a29f59f7 -r e7886363d071
modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewGridComponent.java
---
a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewGridComponent.java
Fri Jan 14 18:12:59 2011 +0100
+++
b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewGridComponent.java
Fri Jan 14 20:03:38 2011 +0100
@@ -210,8 +210,8 @@
// can the column be auto expanded to fill any remaining space
public String getAutoExpand() {
- return Boolean
- .toString(uiDefinition instanceof StringUIDefinition ||
property.isIdentifier());
+ return Boolean.toString(uiDefinition instanceof StringUIDefinition ||
property.isIdentifier()
+ || !property.isPrimitive());
}
public String getName() {
diff -r 6b16a29f59f7 -r e7886363d071
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-formitem-widgets.js
---
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-formitem-widgets.js
Fri Jan 14 18:12:59 2011 +0100
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-formitem-widgets.js
Fri Jan 14 20:03:38 2011 +0100
@@ -428,6 +428,10 @@
// extends standard DateChooser implementation to be used in OBDateItem
isc.ClassFactory.defineClass('OBDateChooser', DateChooser);
+isc.OBDateChooser.addProperties({
+ firstDayOfWeek: 1
+});
+
// == OBDateItem ==
// OBDateItem inherits from SmartClient DateItem
// adds autocomplete and formatting based on the Openbravo date pattern
diff -r 6b16a29f59f7 -r e7886363d071
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 18:12:59 2011 +0100
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-standard-view.js
Fri Jan 14 20:03:38 2011 +0100
@@ -310,7 +310,7 @@
this.viewForm.setDataSource(this.dataSource, this.viewForm.fields);
}
},
-
+
// handles different ways by which an error can be passed from the
// system, translates this to an object with a type, title and message
setErrorMessageFromResponse: function(resp, data, req){
@@ -344,17 +344,17 @@
return false;
}
} else {
- // hope that someone else will handle it
- return false;
+ // hope that someone else will handle it
+ return false;
}
} else if (data.data) {
// try it with data.data
return this.setErrorMessageFromResponse(resp, data.data, req);
- } else {
+ } else {
// hope that someone else will handle it
return false;
}
-
+
req.willHandleError = true;
resp._errorMessageHandled = true;
if (msg.indexOf('@') !== -1) {
@@ -371,7 +371,7 @@
}
return true;
},
-
+
draw: function(){
var result = this.Super('draw', arguments);
if (!this.viewGrid || !this.viewGrid.filterEditor) {
@@ -623,7 +623,9 @@
shouldOpenDefaultEditMode: function(){
// can open default edit mode if defaultEditMode is set
// and this is the root view or a child view with a selected parent.
- return this.allowDefaultEditMode && this.viewGrid.data &&
this.viewGrid.data.getLength() > 1 && this.defaultEditMode && (this.isRootView
|| this.parentView.viewGrid.getSelectedRecords().length === 1);
+ var oneOrMoreSelected = this.viewGrid.data &&
this.viewGrid.data.lengthIsKnown && this.viewGrid.data.lengthIsKnown() &&
+ this.viewGrid.data.getLength() > 1;
+ return this.allowDefaultEditMode && oneOrMoreSelected &&
this.defaultEditMode && (this.isRootView ||
this.parentView.viewGrid.getSelectedRecords().length === 1);
},
// opendefaultedit view for a child view is only called
@@ -645,7 +647,7 @@
} 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
},
@@ -805,15 +807,11 @@
}
if (!this.viewForm.newRecordSavedEvent || !this.viewForm.isVisible()) {
var gridRecord = this.viewGrid.getSelectedRecord();
- if (!gridRecord) {
- // not passing a record forces a new record
- this.editRecord();
- } else {
+ if (gridRecord) {
this.editRecord(gridRecord);
}
this.viewForm.newRecordSavedEvent = false;
}
- this.recordSelected();
// remove this info
delete this.standardWindow.directTabInfo;
diff -r 6b16a29f59f7 -r e7886363d071
modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js
---
a/modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js
Fri Jan 14 18:12:59 2011 +0100
+++
b/modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js
Fri Jan 14 20:03:38 2011 +0100
@@ -325,7 +325,7 @@
src: this.popupIconSrc,
width: this.popupIconWidth,
height: this.popupIconHeight,
- hspace: this.pickerIconHspace,
+ hspace: this.popupIconHspace,
keyPress: function(keyName, character, form, item, icon){
if (keyName === 'Enter' && isc.EventHandler.ctrlKeyDown()) {
item.openSelectorWindow();
diff -r 6b16a29f59f7 -r e7886363d071
modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.userinterface.selector/ob-selector-item-styles.js
---
a/modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.userinterface.selector/ob-selector-item-styles.js
Fri Jan 14 18:12:59 2011 +0100
+++
b/modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.userinterface.selector/ob-selector-item-styles.js
Fri Jan 14 20:03:38 2011 +0100
@@ -43,17 +43,16 @@
}
});
+isc.OBSelectorItem.addProperties(isc.addProperties({},
OB.DefaultPickListStyleProperties));
+
isc.OBSelectorItem.addProperties({
- cellStyle: 'OBFormField',
- titleStyle: 'OBFormFieldLabel',
- textBoxStyle: 'OBFormFieldInput',
newTabIconSrc:
'[SKINIMG]../../org.openbravo.client.application/images/form/ico-to-new-tab.png',
newTabIconSize: 8,
popupIconSrc:
'[SKINIMG]../../org.openbravo.client.application/images/form/search_picker.png',
popupIconWidth: 21,
popupIconHeight: 21,
- pickerIconHspace: 0
+ popupIconHspace: 0
});
isc.OBSelectorLinkItem.addProperties({
------------------------------------------------------------------------------
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