details: /erp/devel/pi/rev/83f5834158f1
changeset: 11095:83f5834158f1
user: Martin Taal <martin.taal <at> openbravo.com>
date: Tue Mar 08 15:23:53 2011 +0100
summary: Solve issue with extra ._identifier filtering
details: /erp/devel/pi/rev/9af9632e9a14
changeset: 11096:9af9632e9a14
user: Martin Taal <martin.taal <at> openbravo.com>
date: Tue Mar 08 15:24:37 2011 +0100
summary: Reformatted, prevent autosave when new, not changed and closing form
details: /erp/devel/pi/rev/5e3b48c5dec6
changeset: 11097:5e3b48c5dec6
user: Martin Taal <martin.taal <at> openbravo.com>
date: Tue Mar 08 15:25:13 2011 +0100
summary: Reformatted, changed save+close logic
details: /erp/devel/pi/rev/44a28572b42c
changeset: 11098:44a28572b42c
user: Martin Taal <martin.taal <at> openbravo.com>
date: Tue Mar 08 15:26:12 2011 +0100
summary: Added new utility for direct opening using just tabId and recordId
details: /erp/devel/pi/rev/f7e47cafe51c
changeset: 11099:f7e47cafe51c
user: Martin Taal <martin.taal <at> openbravo.com>
date: Tue Mar 08 15:27:13 2011 +0100
summary: Support direct opening of record in tab using simple link
details: /erp/devel/pi/rev/3c1ef57fc562
changeset: 11100:3c1ef57fc562
user: Martin Taal <martin.taal <at> openbravo.com>
date: Tue Mar 08 15:27:53 2011 +0100
summary: Support direct opening a record, new mode now also does autosave
details: /erp/devel/pi/rev/1724a83b0f0c
changeset: 11101:1724a83b0f0c
user: Martin Taal <martin.taal <at> openbravo.com>
date: Tue Mar 08 15:28:21 2011 +0100
summary: Solve issue that request props where not send to the server
details: /erp/devel/pi/rev/9ff12adabca8
changeset: 11102:9ff12adabca8
user: Martin Taal <martin.taal <at> openbravo.com>
date: Tue Mar 08 15:29:03 2011 +0100
summary: Implement direct opening of record in tab
details: /erp/devel/pi/rev/367dbc74a9bc
changeset: 11103:367dbc74a9bc
user: Martin Taal <martin.taal <at> openbravo.com>
date: Tue Mar 08 15:29:39 2011 +0100
summary: Small format change
details: /erp/devel/pi/rev/06163e1d01f1
changeset: 11104:06163e1d01f1
user: Martin Taal <martin.taal <at> openbravo.com>
date: Tue Mar 08 15:30:02 2011 +0100
summary: Prevent default filter application when moving selector window
diffstat:
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-grid.js
| 11 +
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-standard-view.js
| 12 +-
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-standard-window.js
| 11 +-
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-statusbar.js
| 222 +++---
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-toolbar.js
| 301 +++++----
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-utilities.js
| 101 ++-
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-form.js
| 13 +-
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-grid.js
| 18 +-
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-manager.js
| 14 +-
modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-filter-select-item.js
| 2 +-
modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js
| 11 +-
11 files changed, 430 insertions(+), 286 deletions(-)
diffs (truncated from 1282 to 300 lines):
diff -r 894a91f93223 -r 06163e1d01f1
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-grid.js
---
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-grid.js
Tue Mar 08 15:11:37 2011 +0100
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-grid.js
Tue Mar 08 15:30:02 2011 +0100
@@ -94,6 +94,17 @@
}
this.filterEditorProperties = {
+
+ setEditValue : function (rowNum, colNum, newValue, suppressDisplay,
suppressChange) {
+ // prevent any setting of non fields in the filter editor
+ // this prevents a specific issue that smartclient will set a value
+ // in the {field.name}._identifier (for example warehouse._identifier)
+ // because it thinks that the field does not have its own datasource
+ if (isc.isA.String(colNum) && !this.getField(colNum)) {
+ return;
+ }
+ return this.Super('setEditValue', arguments);
+ },
getValuesAsCriteria : function (advanced, textMatchStyle, returnNulls) {
return this.Super('getValuesAsCriteria', [true, textMatchStyle,
returnNulls]);
diff -r 894a91f93223 -r 06163e1d01f1
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
Tue Mar 08 15:11:37 2011 +0100
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-standard-view.js
Tue Mar 08 15:30:02 2011 +0100
@@ -547,17 +547,27 @@
isActiveView: function() {
return this.standardWindow.activeView === this;
},
-
+
setAsActiveView: function(){
this.standardWindow.setActiveView(this);
},
+ setTargetRecordInWindow: function(recordId) {
+ if (this.isActiveView()) {
+ this.standardWindow.setTargetInformation(this.tabId, recordId);
+ }
+ },
+
setActiveViewProps: function(state){
if (state) {
this.toolBar.show();
this.activeBar.setActive(true);
this.setViewFocus();
this.viewGrid.setActive(true);
+ // if we are in form view
+ if (this.isShowingForm && !this.viewForm.isNew) {
+ this.setTargetRecordInWindow(this.viewGrid.getSelectedRecord().id);
+ }
} else {
// close any editors we may have
diff -r 894a91f93223 -r 06163e1d01f1
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-standard-window.js
---
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-standard-window.js
Tue Mar 08 15:11:37 2011 +0100
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-standard-window.js
Tue Mar 08 15:30:02 2011 +0100
@@ -292,7 +292,6 @@
draw: function(){
var standardWindow = this, targetEntity;
var ret = this.Super('draw', arguments);
-
if (this.targetTabId) {
for (var i = 0; i < this.views.length; i++) {
if (this.views[i].tabId === this.targetTabId) {
@@ -365,6 +364,10 @@
result.windowId = this.windowId;
result.viewId = this.getClassName();
result.tabTitle = this.tabTitle;
+ if (this.targetTabId) {
+ result.targetTabId = this.targetTabId;
+ result.targetRecordId = this.targetRecordId;
+ }
return result;
},
@@ -381,6 +384,12 @@
return this.isEqualParams(params) && viewName === this.getClassName();
},
+ setTargetInformation: function(tabId, recordId) {
+ this.targetTabId = tabId;
+ this.targetRecordId = recordId;
+ OB.Layout.HistoryManager.updateHistory();
+ },
+
storeViewState: function(){
var result={};
for (var i = 0; i < this.views.length; i++) {
diff -r 894a91f93223 -r 06163e1d01f1
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-statusbar.js
---
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-statusbar.js
Tue Mar 08 15:11:37 2011 +0100
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-statusbar.js
Tue Mar 08 15:30:02 2011 +0100
@@ -18,44 +18,48 @@
*/
isc.ClassFactory.defineClass('OBStatusBarLeftBar', isc.HLayout);
-isc.OBStatusBarLeftBar.addProperties({
- // to allow setting the active view when clicking in the statusbar
- canFocus: true
-});
+isc.OBStatusBarLeftBar.addProperties( {
+ // to allow setting the active view when clicking in the statusbar
+ canFocus : true
+ });
isc.ClassFactory.defineClass('OBStatusBarTextLabel', isc.Label);
-isc.OBStatusBarTextLabel.addProperties({
- // to allow setting the active view when clicking in the statusbar
- canFocus: true
-});
+isc.OBStatusBarTextLabel.addProperties( {
+ // to allow setting the active view when clicking in the statusbar
+ canFocus : true
+ });
isc.ClassFactory.defineClass('OBStatusBarIconButtonBar', isc.HLayout);
-isc.OBStatusBarIconButtonBar.addProperties({
- // to allow setting the active view when clicking in the statusbar
- canFocus: true
-});
+isc.OBStatusBarIconButtonBar.addProperties( {
+ // to allow setting the active view when clicking in the statusbar
+ canFocus : true
+ });
isc.ClassFactory.defineClass('OBStatusBarIconButton', isc.ImgButton);
-isc.OBStatusBarIconButton.addProperties({
- buttonType: null,
- view: null,
- // to allow setting the active view when clicking in the statusbar
- canFocus: true,
-
+isc.OBStatusBarIconButton.addProperties( {
+ buttonType : null,
+ view : null,
+ // to allow setting the active view when clicking in the statusbar
+ canFocus : true,
+
// always go through the autosave of the window
- action: function() {
+ action : function() {
+ // don't do autosave if new and nothing changed
+ if (this.buttonType === 'close' && !this.view.viewForm.hasChanged &&
this.view.viewForm.isNew) {
+ this.view.standardWindow.setDirtyEditForm(null);
+ }
var actionObject = {
- target: this,
- method: this.doAction,
- parameters: []
+ target : this,
+ method : this.doAction,
+ parameters : []
};
this.view.standardWindow.doActionAfterAutoSave(actionObject, true);
},
-
- doAction: function(){
+
+ doAction : function() {
var rowNum, newRowNum, newRecord;
if (this.buttonType === 'previous') {
this.view.editNextPreviousRecord(false);
@@ -70,116 +74,120 @@
this.view.messageBar.hide();
}
},
-
- initWidget: function(){
+
+ initWidget : function() {
if (this.initWidgetStyle) {
this.initWidgetStyle();
}
this.Super('initWidget', arguments);
}
-
+
});
-
isc.ClassFactory.defineClass('OBStatusBar', isc.HLayout);
-isc.OBStatusBar.addProperties({
- view: null,
- iconButtonGroupSpacerWidth: 0, //Set in the skin
-
- nextButton: null,
- previousButton: null,
- newIcon: null,
- showingIcon: false,
-
- initWidget: function(){
- this.stateLabel = isc.OBStatusBarTextLabel.create({
- contents: ' ',
- width: '100%',
- height: '100%'
+isc.OBStatusBar.addProperties( {
+ view : null,
+ iconButtonGroupSpacerWidth : 0, // Set in the skin
+
+ nextButton : null,
+ previousButton : null,
+ newIcon : null,
+ showingIcon : false,
+
+ initWidget : function() {
+ this.stateLabel = isc.OBStatusBarTextLabel.create( {
+ contents : ' ',
+ width : '100%',
+ height : '100%'
});
-
- this.leftStatusBar = isc.OBStatusBarLeftBar.create({});
+
+ this.leftStatusBar = isc.OBStatusBarLeftBar.create( {});
this.leftStatusBar.addMember(this.stateLabel);
-
- this.previousButton = isc.OBStatusBarIconButton.create({
- view: this.view,
- buttonType: 'previous',
- prompt: OB.I18N.getLabel('OBUIAPP_PREVIOUSBUTTON')
+
+ this.previousButton = isc.OBStatusBarIconButton.create( {
+ view : this.view,
+ buttonType : 'previous',
+ prompt : OB.I18N.getLabel('OBUIAPP_PREVIOUSBUTTON')
});
- this.nextButton = isc.OBStatusBarIconButton.create({
- view: this.view,
- buttonType: 'next',
- prompt: OB.I18N.getLabel('OBUIAPP_NEXTBUTTON')
+ this.nextButton = isc.OBStatusBarIconButton.create( {
+ view : this.view,
+ buttonType : 'next',
+ prompt : OB.I18N.getLabel('OBUIAPP_NEXTBUTTON')
});
- this.closeButton = isc.OBStatusBarIconButton.create({
- view: this.view,
- buttonType: 'close',
- prompt: OB.I18N.getLabel('OBUIAPP_CLOSEBUTTON')
+ this.closeButton = isc.OBStatusBarIconButton.create( {
+ view : this.view,
+ buttonType : 'close',
+ prompt : OB.I18N.getLabel('OBUIAPP_CLOSEBUTTON')
});
- this.maximizeButton = isc.OBStatusBarIconButton.create({
- view: this.view,
- buttonType: 'maximize',
- prompt: OB.I18N.getLabel('OBUIAPP_MAXIMIZEBUTTON')
+ this.maximizeButton = isc.OBStatusBarIconButton.create( {
+ view : this.view,
+ buttonType : 'maximize',
+ prompt : OB.I18N.getLabel('OBUIAPP_MAXIMIZEBUTTON')
});
- this.restoreButton = isc.OBStatusBarIconButton.create({
- visibility: 'hidden',
- view: this.view,
- buttonType: 'restore',
- prompt: OB.I18N.getLabel('OBUIAPP_RESTOREBUTTON')
+ this.restoreButton = isc.OBStatusBarIconButton.create( {
+ visibility : 'hidden',
+ view : this.view,
+ buttonType : 'restore',
+ prompt : OB.I18N.getLabel('OBUIAPP_RESTOREBUTTON')
});
- var buttonSpacer = isc.HLayout.create({
- width: this.iconButtonGroupSpacerWidth
+ var buttonSpacer = isc.HLayout.create( {
+ width : this.iconButtonGroupSpacerWidth
});
- var buttonBar = isc.OBStatusBarIconButtonBar.create({});
-
- buttonBar.addMembers([this.previousButton, this.nextButton, buttonSpacer,
this.maximizeButton, this.restoreButton, this.closeButton]);
- for (var i = 0; i < buttonBar.members.length; i++) {
+ var buttonBar = isc.OBStatusBarIconButtonBar.create( {});
+
+ buttonBar.addMembers( [ this.previousButton, this.nextButton, buttonSpacer,
+ this.maximizeButton, this.restoreButton, this.closeButton ]);
+ for ( var i = 0; i < buttonBar.members.length; i++) {
if (buttonBar.members[i].buttonType) {
-
OB.TestRegistry.register('org.openbravo.client.application.statusbar.button.' +
buttonBar.members[i].buttonType + '.' + this.view.tabId, buttonBar.members[i]);
+ OB.TestRegistry.register(
+ 'org.openbravo.client.application.statusbar.button.' +
buttonBar.members[i].buttonType + '.' + this.view.tabId,
+ buttonBar.members[i]);
}
}
this.checkedIcon = isc.Img.create(this.checkedIconDefaults);
this.newIcon = isc.Img.create(this.newIconDefaults);
- this.spacer = isc.LayoutSpacer.create({width: 14});
+ this.spacer = isc.LayoutSpacer.create( {
+ width : 14
+ });
this.leftStatusBar.addMember(this.spacer, 0);
- this.addMembers([this.leftStatusBar, buttonBar]);
+ this.addMembers( [ this.leftStatusBar, buttonBar ]);
return this.Super('initWidget', arguments);
------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits