Openbravo Issue Tracking System - Retail Modules
View Issue Details
0043475Retail ModulesWeb POSpublic2020-03-11 09:122020-05-25 08:16
kchoperena 
prakashmurugesan88 
highmajoralways
closedfixed 
5
 
RR20Q3 
marvintm
No
0043475: Any component that extends OB.UI.Modal and have maxheight defined without bodyParent, fails in WebPOS login
The OB.UI.Modal does not have a bodyParent defined. In the initComponents function, there is a code to set the maxheight to the bodyParent but there is no bodyParent present in OB.UI.Modal.

if (this.maxheight) {
      //FIXME-SKIN
      this.$.bodyParent.setStyle('max-height: ' + this.maxheight + ';');
}


So then, if a new component extends from OB.UI.Modal and have a maxheight but not a bodyParent, the login fails in this code.
Also, in the upgrade to 20Q1 we are not allowing set styles in this way. The correct approach to do that is apply the maxheight using CSS.
1.- Create a new component that extends from OB.UI.Modal
2.- Define a maxheight but not a bodyParent
3.- Try to do login in the WebPOS
No tags attached.
diff maxHeightApplyStyleRemoveOBUIModal.diff (582) 2020-03-11 09:12
https://issues.openbravo.com/file_download.php?file_id=14156&type=bug
Issue History
2020-03-11 09:12kchoperenaNew Issue
2020-03-11 09:12kchoperenaAssigned To => Retail
2020-03-11 09:12kchoperenaFile Added: maxHeightApplyStyleRemoveOBUIModal.diff
2020-03-11 09:12kchoperenaResolution time => 1585090800
2020-03-11 09:12kchoperenaTriggers an Emergency Pack => No
2020-05-05 12:08rafademiguelPrioritynormal => high
2020-05-05 16:02marvintmResolution time1585090800 => 1590444000
2020-05-05 16:02marvintmTypedesign defect => defect
2020-05-21 07:24prakashmurugesan88Assigned ToRetail => prakashmurugesan88
2020-05-21 07:24prakashmurugesan88Statusnew => scheduled
2020-05-21 12:09hgbotCheckin
2020-05-21 12:09hgbotNote Added: 0120124
2020-05-21 12:09hgbotStatusscheduled => resolved
2020-05-21 12:09hgbotResolutionopen => fixed
2020-05-21 12:09hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/d7d9374287533364e3f4cfef216d3b70bb5490f7 [^]
2020-05-25 08:16marvintmReview Assigned To => marvintm
2020-05-25 08:16marvintmStatusresolved => closed
2020-05-25 08:16marvintmFixed in Version => RR20Q3

Notes
(0120124)
hgbot   
2020-05-21 12:09   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: d7d9374287533364e3f4cfef216d3b70bb5490f7
Author: Prakash M <prakash <at> qualiantech.com>
Date: Thu May 21 15:39:03 2020 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/d7d9374287533364e3f4cfef216d3b70bb5490f7 [^]

Fixed BUG-43475: Extending OB.UI.Modal with maxheight defined and without
bodyParent causes js error

As per new skin implementation setting maxheight to bodyParent is not needed.
Also styles should not be applied statically in new skin.
Styles should be applied through css class.

Removed this part of code.

---
M web/org.openbravo.mobile.core/source/component/ob-commonbuttons.js
---