details: /erp/devel/pi/rev/18e521915d17
changeset: 9685:18e521915d17
user: Martin Taal <martin.taal <at> openbravo.com>
date: Mon Jan 10 18:47:45 2011 +0100
summary: Solved undefined blur method
details: /erp/devel/pi/rev/e8e50f8b1c24
changeset: 9686:e8e50f8b1c24
user: Martin Taal <martin.taal <at> openbravo.com>
date: Mon Jan 10 18:48:10 2011 +0100
summary: Changed way rootview was determined, solves showing financial
transaction window
details: /erp/devel/pi/rev/3e76ba956f47
changeset: 9687:3e76ba956f47
user: Martin Taal <martin.taal <at> openbravo.com>
date: Tue Jan 11 00:21:40 2011 +0100
summary: Added progress indication in save button and on row level
details: /erp/devel/pi/rev/19f40ada74fa
changeset: 9688:19f40ada74fa
user: Martin Taal <martin.taal <at> openbravo.com>
date: Tue Jan 11 00:22:37 2011 +0100
summary: Merged heads
diffstat:
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-formitem-widgets.js
|
5 +-
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-standard-view.js
| 106 +++++----
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-toolbar.js
| 11 +-
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-form.js
| 6 +-
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-grid.js
| 18 +-
modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.application/images/system/progress-indicator-icon.gif
| 0
modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.application/ob-grid-styles.js
| 9 +-
modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.application/ob-toolbar-styles.css
| 10 +
modules/org.openbravo.client.querylist/src/org/openbravo/client/querylist/QueryListComponentProvider.java
|
5 +
modules/org.openbravo.client.querylist/web/org.openbravo.client.querylist/js/ob-querylist-widget.js
| 22 +-
modules/org.openbravo.client.querylist/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.querylist/ob-querylist-styles.css
| 25 ++-
modules/org.openbravo.client.querylist/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.querylist/ob-querylist-styles.js
| 37 +++
12 files changed, 184 insertions(+), 70 deletions(-)
diffs (truncated from 494 to 300 lines):
diff -r 32ac720be227 -r 19f40ada74fa
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
Mon Jan 10 18:28:41 2011 +0100
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-formitem-widgets.js
Tue Jan 11 00:22:37 2011 +0100
@@ -969,7 +969,10 @@
form.handleItemChange(this);
}
this._hasChanged = false;
- return this._originalBlur(form, item);
+ if (this._originalBlur) {
+ return this._originalBlur(form, item);
+ }
+ return;
};
}
});
diff -r 32ac720be227 -r 19f40ada74fa
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
Mon Jan 10 18:28:41 2011 +0100
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-standard-view.js
Tue Jan 11 00:22:37 2011 +0100
@@ -41,6 +41,7 @@
this.addMember(this.toolBarLayout);
this.viewProperties.standardWindow = this;
+ this.viewProperties.isRootView = true;
this.view = isc.OBStandardView.create(this.viewProperties);
this.addView(this.view);
this.addMember(this.view);
@@ -341,13 +342,11 @@
readOnly: false,
initWidget: function(properties){
- var isRootView = !this.parentProperty;
-
this.messageBar = isc.OBMessageBar.create({
visibility: 'hidden'
});
- if (isRootView) {
+ if (this.isRootView) {
this.buildStructure();
}
@@ -368,17 +367,11 @@
},
buildStructure: function(){
- var isRootView = !this.parentProperty;
- // if (isRootView) {
- // this.setOverflow('hidden');
- // } else {
- // this.setOverflow('auto');
- // }
this.createMainParts();
this.createViewStructure();
this.dataSource = OB.Datasource.get(this.dataSourceId, this);
- if (isRootView) {
+ if (this.isRootView) {
if (this.childTabSet) {
this.members[0].setHeight('50%');
this.members[1].setHeight('50%');
@@ -399,21 +392,53 @@
var modifiedDs = isc.addProperties({}, ds, {
view: this,
+ showProgressAfterDelay: false,
+ currentSelectedRecord: null,
- fetchData: function(criteria, callback, requestProperties){
- // isc.Dialog.Prompt.modalTarget = this.view.standardWindow;
-
- var newRequestProperties =
OB.Utilities._getTabInfoRequestProperties(this.view, requestProperties);
- var additionalPara = {
- _operationType: 'fetch',
- _noActiveFilter: true
- };
- isc.addProperties(newRequestProperties.params, additionalPara);
- return this.Super('fetchData', [criteria, callback,
newRequestProperties]);
+ setCurrentSelectedRecord: function() {
+ if (this.currentSelectedRecord &&
this.currentSelectedRecord.editColumnLayout) {
+
this.currentSelectedRecord.editColumnLayout.toggleProgressIcon(false);
+ }
+ this.currentSelectedRecord = this.view.viewGrid.getSelectedRecord();
},
- updateData: function(updatedRecord, callback, requestProperties){
+ showProgress: function(){
+ // hide another one if we are showing it
+ if (this.view.viewGrid.isVisible() && this.currentSelectedRecord) {
+ this.currentSelectedRecord.editColumnLayout.toggleProgressIcon(true);
+ }
+
+ // don't show it, done to quickly
+ if (!this.showProgressAfterDelay) {
+ return;
+ }
+ var btn = this.view.toolBar.getLeftMember(isc.OBToolbar.TYPE_SAVE);
+ btn.customState = 'Progress';
+ btn.resetBaseStyle();
+ btn.markForRedraw();
+ },
+ hideProgress: function(){
+ if (this.currentSelectedRecord &&
this.currentSelectedRecord.editColumnLayout) {
+
this.currentSelectedRecord.editColumnLayout.toggleProgressIcon(false);
+ }
+ this.currentSelectedRecord = null;
+
+ this.showProgressAfterDelay = false;
+ var btn = this.view.toolBar.getLeftMember(isc.OBToolbar.TYPE_SAVE);
+ btn.customState = '';
+ btn.resetBaseStyle();
+ btn.markForRedraw();
+ },
+
+ performDSOperation: function(operationType, data, callback,
requestProperties){
+ requestProperties.showPrompt = false;
+ // only show progress after 200ms delay
+ this.showProgressAfterDelay = true;
+ // set the current selected record before the delay
+ this.setCurrentSelectedRecord();
+ this.delayCall('showProgress', [], 200);
+
var newRequestProperties =
OB.Utilities._getTabInfoRequestProperties(this.view, requestProperties);
//standard update is not sent with operationType
var additionalPara = {
@@ -421,35 +446,11 @@
_noActiveFilter: true
};
isc.addProperties(newRequestProperties.params, additionalPara);
- this.Super('updateData', [updatedRecord, callback,
newRequestProperties]);
- },
-
- addData: function(updatedRecord, callback, requestProperties){
-
- var newRequestProperties =
OB.Utilities._getTabInfoRequestProperties(this.view, requestProperties);
- //standard update is not sent with operationType
- var additionalPara = {
- _operationType: 'add',
- _noActiveFilter: true
- };
- isc.addProperties(newRequestProperties.params, additionalPara);
- this.Super('addData', [updatedRecord, callback, newRequestProperties]);
- },
-
- removeData: function(updatedRecord, callback, requestProperties){
-
- var newRequestProperties =
OB.Utilities._getTabInfoRequestProperties(this.view, requestProperties);
- //standard update is not sent with operationType
- var additionalPara = {
- _operationType: 'remove',
- _noActiveFilter: true
- };
- isc.addProperties(newRequestProperties.params, additionalPara);
- this.Super('removeData', [updatedRecord, callback,
newRequestProperties]);
+ this.Super('performDSOperation', arguments);
},
transformResponse: function(dsResponse, dsRequest, jsonData){
-
+ this.hideProgress();
// isc.Dialog.Prompt.modalTarget = null;
var errorStatus = !jsonData.response || jsonData.response.status ===
'undefined' || jsonData.response.status !== isc.RPCResponse.STATUS_SUCCESS;
@@ -489,7 +490,7 @@
this.viewGrid.targetRecordId = this.targetRecordId;
}
this.viewGrid.setDataSource(this.dataSource,
this.viewGrid.completeFields || this.viewGrid.fields);
- if (!this.parentProperty) {
+ if (this.isRootView) {
this.viewGrid.fetchData();
this.refreshContents = false;
}
@@ -515,7 +516,7 @@
// ** {{{ createMainParts }}} **
// Creates the main layout components of this view.
createMainParts: function(){
- var isRootView = !this.parentProperty, formContainerLayout;
+ var formContainerLayout;
var me = this;
if (this.tabId && this.tabId.length > 0) {
this.formGridLayout = isc.HLayout.create({
@@ -742,7 +743,7 @@
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.defaultEditMode &&
(!this.parentProperty || this.parentView.viewGrid.getSelectedRecords().length
=== 1);
+ return this.allowDefaultEditMode && this.defaultEditMode &&
(this.isRootView || this.parentView.viewGrid.getSelectedRecords().length === 1);
},
// opendefaultedit view for a child view is only called
@@ -753,7 +754,7 @@
return;
}
// preventFocus is treated as a boolean later
- var preventFocus = this.parentProperty;
+ var preventFocus = !this.isRootView;
// don't open it again
this.allowDefaultEditMode = false;
@@ -1637,3 +1638,6 @@
}
}
});
+
+isc.RPCManager.showPrompt = false;
+isc.RPCManager.neverShowPrompt = true;
diff -r 32ac720be227 -r 19f40ada74fa
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-toolbar.js
---
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-toolbar.js
Mon Jan 10 18:28:41 2011 +0100
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-toolbar.js
Tue Jan 11 00:22:37 2011 +0100
@@ -568,7 +568,7 @@
/** ----------------------------- **/
-isc.ClassFactory.defineClass('OBToolbarIconButton', isc.MenuButton);
+isc.ClassFactory.defineClass('OBToolbarIconButton', isc.Button);
isc.OBToolbarIconButton.addProperties({
showRollOver: true,
@@ -578,9 +578,14 @@
showFocusedAsOver: false,
title: '.',
showHover: true,
+ customState: '',
initWidget: function(){
this.Super('initWidget', arguments);
+ this.resetBaseStyle();
+ },
+
+ resetBaseStyle: function() {
var isMenu = false, extraClass;
if (this.menu !== null) {
isMenu = true;
@@ -594,8 +599,8 @@
this.iconWidth = 1;
this.iconHeight = 1;
}
-
- this.setBaseStyle('OBToolbarIconButton_icon_' + this.buttonType +
extraClass + 'OBToolbarIconButton');
+
+ this.setBaseStyle('OBToolbarIconButton_icon_' + this.buttonType +
this.customState + extraClass + 'OBToolbarIconButton');
}
});
diff -r 32ac720be227 -r 19f40ada74fa
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 10 18:28:41 2011 +0100
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-form.js
Tue Jan 11 00:22:37 2011 +0100
@@ -439,9 +439,9 @@
}
// an error occured, show a popup
- if (autoSave && status !== isc.RPCResponse.STATUS_SUCCESS) {
+ if (status !== isc.RPCResponse.STATUS_SUCCESS) {
// if there is an action, ask for confirmation
- if (action) {
+ if (action && autoSave) {
this.autoSaveConfirmAction(action);
} else if (!view.isVisible() || forceDialogOnFailure) {
isc.warn(OB.I18N.getLabel('OBUIAPP_AutoSaveError', [view.tabTitle]));
@@ -455,7 +455,7 @@
// done by calling showErrors without the third parameter to true
if (!this.validate()) {
this.handleFieldErrors(null, autoSave);
- if (autoSave && !form.view.isVisible() || forceDialogOnFailure) {
+ if (!form.view.isVisible() || forceDialogOnFailure) {
isc.warn(OB.I18N.getLabel('OBUIAPP_AutoSaveError',
[this.view.tabTitle]));
} else if (action) {
this.autoSaveConfirmAction(action);
diff -r 32ac720be227 -r 19f40ada74fa
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-grid.js
---
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-grid.js
Mon Jan 10 18:28:41 2011 +0100
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-grid.js
Tue Jan 11 00:22:37 2011 +0100
@@ -111,8 +111,8 @@
// it is better to allow fast grid interaction and if an error occurs
// dismiss any new records being edited and go back to the edit row
// which causes the error
- //waitForSave: true,
- //stopOnErrors: true,
+ waitForSave: false,
+ stopOnErrors: false,
confirmDiscardEdits: true,
canMultiSort: false,
@@ -879,6 +879,9 @@
initWidget: function(){
var me = this;
+
+ this.progressIcon = isc.Img.create(this.grid.progressIconDefaults);
+
editIcon = isc.OBGridToolStripIcon.create({
buttonType: 'edit',
action: function(){
@@ -915,12 +918,23 @@
members: [formIcon, buttonSeparator1, editIcon, cancelIcon,
buttonSeparator2, saveIcon]
});
+ this.addMember(this.progressIcon);
this.addMember(this.OBGridToolStrip);
this.OBGridToolStrip.hideMember(5);
this.OBGridToolStrip.hideMember(4);
------------------------------------------------------------------------------
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web. Learn how to
best implement a security strategy that keeps consumers' information secure
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits