details: /erp/devel/pi/rev/10d2fcbef85a
changeset: 9740:10d2fcbef85a
user: Martin Taal <martin.taal <at> openbravo.com>
date: Wed Jan 12 19:10:19 2011 +0100
summary: Solved an issue with wrong display of search item values
details: /erp/devel/pi/rev/12c75172b2ff
changeset: 9741:12c75172b2ff
user: Martin Taal <martin.taal <at> openbravo.com>
date: Wed Jan 12 19:10:56 2011 +0100
summary: New button now also triggers autosave
details: /erp/devel/pi/rev/a5f2dffc1cd1
changeset: 9742:a5f2dffc1cd1
user: Martin Taal <martin.taal <at> openbravo.com>
date: Wed Jan 12 19:11:17 2011 +0100
summary: Reload combos on redisplay of form
diffstat:
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-formitem-widgets.js
| 12 ++++-
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-standard-view.js
| 20 ++++++++--
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-form.js
| 20 +++------
3 files changed, 32 insertions(+), 20 deletions(-)
diffs (125 lines):
diff -r af7242b4c37c -r a5f2dffc1cd1
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
Wed Jan 12 19:09:37 2011 +0100
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-formitem-widgets.js
Wed Jan 12 19:11:17 2011 +0100
@@ -66,8 +66,14 @@
function closeSearch(action, value, display, parameters, wait){
var length, i, hiddenInputName, targetFld = isc.OBSearchItem.openSearchItem;
if (action === 'SAVE') {
+ if (!targetFld.valueMap) {
+ targetFld.valueMap = {};
+ }
+
targetFld.setValue(value);
+ targetFld.valueMap[targetFld.getValue()] = display;
targetFld.form.setValue(targetFld.displayField, display);
+ targetFld.updateValueMap(true);
if (parameters && parameters.length > 0) {
length = parameters.length;
@@ -277,13 +283,13 @@
// visual state of disabled or non-disabled stays the same now
showDisabled: false,
- initWidget: function() {
+ initWidget: function(){
var ret = this.Super('initWidget', arguments);
return ret;
},
- updateDisabled: function() {
- var ret = this.Super('initWidget', arguments);
+ updateDisabled: function(){
+ var ret = this.Super('initWidget', arguments);
return ret;
},
diff -r af7242b4c37c -r a5f2dffc1cd1
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
Wed Jan 12 19:09:37 2011 +0100
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-standard-view.js
Wed Jan 12 19:11:17 2011 +0100
@@ -939,13 +939,18 @@
},
// ++++++++++++++++++++ Button Actions ++++++++++++++++++++++++++
+
+ // make a special refresh:
+ // - refresh the current selected record without changing the selection
+ // - refresh the parent/grand-parent in the same way without changing the
selection
+ // - recursive to children: refresh the children, put the children in grid
mode and refresh
refresh: function(refreshCallback){
if (this.viewGrid.isVisible()) {
this.viewGrid.filterData(this.viewGrid.getCriteria(), refreshCallback);
} else {
var view = this;
- if (this.viewForm.valuesHaveChanged()) {
+ if (this.viewForm.hasChanged) {
var callback = function(ok){
if (ok) {
var criteria = [];
@@ -1023,12 +1028,17 @@
},
newRow: function(){
- this.editRecord(null);
+ var actionObject = {
+ target: this,
+ method: this.editRecord,
+ parameters: null
+ };
+ this.viewForm.autoSave(actionObject);
},
undo: function(){
var view = this, callback;
- if (this.viewForm.valuesHaveChanged()) {
+ if (this.viewForm.hasChanged) {
callback = function(ok){
if (ok) {
view.viewForm.undo();
@@ -1195,6 +1205,8 @@
}
};
-
OB.RemoteCallManager.call('org.openbravo.client.application.window.GetTabMessageActionHandler',
{tabId: this.tabId}, null, callback, this);
+
OB.RemoteCallManager.call('org.openbravo.client.application.window.GetTabMessageActionHandler',
{
+ tabId: this.tabId
+ }, null, callback, this);
}
});
diff -r af7242b4c37c -r a5f2dffc1cd1
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
Wed Jan 12 19:09:37 2011 +0100
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-form.js
Wed Jan 12 19:11:17 2011 +0100
@@ -180,19 +180,6 @@
this.fieldsByColumnName = null;
},
- show: function(){
-
- // if the view is showing the form then the show action
- // is because a tab is selected not because a grid to form
- // thing happens
- // if (this.view.isShowingForm) {
- // console.log('Do change fic call');
- // this.doChangeFICCall();
- // }
-
- return this.Super('show', arguments);
- },
-
retrieveInitialValues: function(isNew){
var parentId = this.view.getParentId(), requestParams, parentColumn, me =
this, mode;
@@ -605,6 +592,13 @@
}
return titleHTML;
+ },
+
+ // we are being reshown, get new values for the combos
+ visibilityChanged: function(visible){
+ if (visible && this.view.isShowingForm) {
+ this.doChangeFICCall();
+ }
}
});
------------------------------------------------------------------------------
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