Author: jleroux
Date: Thu May 27 07:07:05 2010
New Revision: 948694
URL:
http://svn.apache.org/viewvc?rev=948694&view=revLog:
A patch from Sascha Rodekamp "The position attribute (at least center) does not work when used in a lookup called from another lookup " (
https://issues.apache.org/jira/browse/OFBIZ-3781) - OFBIZ-3781
Here is a little patch to fix the center issue. I had to remove some code which is not needed anymore.
Modified:
ofbiz/trunk/framework/images/webapp/images/fieldlookup.js
Modified: ofbiz/trunk/framework/images/webapp/images/fieldlookup.js
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/fieldlookup.js?rev=948694&r1=948693&r2=948694&view=diff==============================================================================
--- ofbiz/trunk/framework/images/webapp/images/fieldlookup.js (original)
+++ ofbiz/trunk/framework/images/webapp/images/fieldlookup.js Thu May 27 07:07:05 2010
@@ -369,20 +369,12 @@ var FieldLookupPopup = Class.create({
//set layer position
var bdy = document.body;
if (this.position == "center") {
- if (ACTIVATED_LOOKUP != null) {
- obj = GLOBAL_LOOKUP_REF.getReference(ACTIVATED_LOOKUP);
- obj.divRef.appendChild(lookupDiv);
- lookupLeft = 0;
- lookupTop = 0;
- }
- else {
- bdy.appendChild(lookupDiv);
- var dimensions = lookupDiv.getDimensions();
- lookupLeft = (bdy.offsetWidth / 2) - (dimensions.width / 2);
- var scrollOffY = document.viewport.getScrollOffsets().top;
- var winHeight = document.viewport.getHeight();
- lookupTop = (scrollOffY + winHeight / 2) - (dimensions.height / 2);
- }
+ bdy.appendChild(lookupDiv);
+ var dimensions = lookupDiv.getDimensions();
+ lookupLeft = (bdy.offsetWidth / 2) - (dimensions.width / 2);
+ var scrollOffY = document.viewport.getScrollOffsets().top;
+ var winHeight = document.viewport.getHeight();
+ lookupTop = (scrollOffY + winHeight / 2) - (dimensions.height / 2);
lookupDiv.style.left = lookupLeft + "px";
lookupDiv.style.top = lookupTop + "px";