details: https://code.openbravo.com/erp/devel/pi/rev/f7638eff9760
changeset: 14959:f7638eff9760
user: Martin Taal <martin.taal <at> openbravo.com>
date: Tue Dec 27 20:22:17 2011 +0100
summary: Fixes issue 19364: Payment Monitor section in the Invoices does not
appear
Solve typo and change the way the visibility of section is computed
diffstat:
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-section.js
| 13 ++++-
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
| 22 ++++++---
2 files changed, 23 insertions(+), 12 deletions(-)
diffs (98 lines):
diff -r b0cfd95061fd -r f7638eff9760
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-section.js
---
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-section.js
Fri Dec 23 13:48:05 2011 +0100
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-section.js
Tue Dec 27 20:22:17 2011 +0100
@@ -75,7 +75,7 @@
if (item.hiddenInForm) {
continue;
}
- if (item.visible || item.displayed !== false) {
+ if (item.displayed !== false) {
item.alwaysTakeSpace = flag;
}
}
@@ -95,11 +95,15 @@
var ret = this.Super('expandSection', arguments);
return ret;
},
-
+
showIf: function(item, value, form, values) {
var i, field, length;
+
+ if(!this.itemIds) {
+ return false;
+ }
- if(!this.itemIds) {
+ if (item.hiddenInForm === true || item.displayed === false ) {
return false;
}
@@ -108,7 +112,7 @@
for (i = 0; i < length; i++) {
field = form.getItem(this.itemIds[i]);
- if(!field || (item.visible === false || item.displayed === false ||
item.hiddenInForm === true)) {
+ if(!field || field.displayed === false || field.hiddenInForm === true) {
continue;
}
@@ -120,6 +124,7 @@
return true;
}
}
+
return false;
}
});
diff -r b0cfd95061fd -r f7638eff9760
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
---
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
Fri Dec 23 13:48:05 2011 +0100
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
Tue Dec 27 20:22:17 2011 +0100
@@ -255,10 +255,12 @@
if (enable) {
this.noteSection.setRecordInfo(this.view.entity,
this.getValue(OB.Constants.ID));
this.noteSection.collapseSection(true);
+ delete this.noteSection.hiddenInForm;
this.noteSection.refresh();
- this.noteSection.show();
+ this.noteSection.show(true);
} else {
- this.noteSection.hide();
+ this.noteSection.hiddenInForm = true;
+ this.noteSection.hide(true);
}
},
@@ -269,9 +271,11 @@
if (enable) {
this.linkedItemSection.collapseSection(true);
this.linkedItemSection.setRecordInfo(this.view.entity,
this.getValue(OB.Constants.ID));
- this.linkedItemSection.show();
+ delete this.linkedItemSection.hiddenInForm;
+ this.linkedItemSection.show(true);
} else {
- this.linkedItemSection.hide();
+ this.linkedItemSection.hiddenInForm = true;
+ this.linkedItemSection.hide(true);
}
},
@@ -279,12 +283,14 @@
if (!this.attachmentsSection) {
return;
}
- if(enable){
+ if (enable) {
this.attachmentsSection.collapseSection(true);
this.attachmentsSection.setRecordInfo(this.view.entity,
this.getValue(OB.Constants.ID), this.view.tabId);
- this.attachmentsSection.show();
- }else{
- this.attachmentsSection.hide();
+ delete this.attachmentsSection.hiddenInForm;
+ this.attachmentsSection.show(true);
+ } else {
+ this.attachmentsSection.hiddenInForm = true;
+ this.attachmentsSection.hide(true);
}
},
------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create
new or port existing apps to sell to consumers worldwide. Explore the
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits