details:   https://code.openbravo.com/erp/devel/pi/rev/010420803d1c
changeset: 28569:010420803d1c
user:      Carlos Aristu <carlos.aristu <at> openbravo.com>
date:      Wed Feb 03 19:42:14 2016 +0100
summary:   fixes issue 32092: hidden fields space not restored after reopening 
form view

The alwaysTakeSpace property of the form items was only being set after opening 
the form view the first time. This property is used to keep space for the 
displayed field (including the hidden ones by display logic). This property is 
being set to false when closing form view, and then, never restored again.

Now this property is set every time the UI switches into the form view.

diffstat:

 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
     |  10 ++++++++++
 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
 |   2 ++
 2 files changed, 12 insertions(+), 0 deletions(-)

diffs (32 lines):

diff -r fc90763f8bed -r 010420803d1c 
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
     Wed Feb 03 19:29:23 2016 +0100
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
     Wed Feb 03 19:42:14 2016 +0100
@@ -2185,5 +2185,15 @@
       }
     }
     return true;
+  },
+
+  updateAlwaysTakeSpaceInSections: function () {
+    var i, item, length = this.getItems().length;
+    for (i = 0; i < length; i++) {
+      item = this.getItems()[i];
+      if (isc.isA.SectionItem(item) && item.isExpanded()){
+        item.updateAlwaysTakeSpace(true);
+      }
+    }
   }
 };
\ No newline at end of file
diff -r fc90763f8bed -r 010420803d1c 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
--- 
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
 Wed Feb 03 19:29:23 2016 +0100
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
 Wed Feb 03 19:42:14 2016 +0100
@@ -1378,6 +1378,8 @@
     if (!this.isShowingForm) {
       if (!this.viewForm.getDataSource()) {
         this.prepareViewForm();
+      } else {
+        this.viewForm.updateAlwaysTakeSpaceInSections();
       }
       if (this.treeGrid) {
         if (this.isShowingTree) {

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Openbravo-commits mailing list
Openbravo-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to