You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2010/05/15 13:42:01 UTC
svn commit: r944614 - in /ofbiz/trunk: framework/common/webcommon/includes/
framework/images/webapp/images/ themes/bizznesstime/webapp/bizznesstime/css/
themes/bluelight/webapp/bluelight/
themes/droppingcrumbs/webapp/droppingcrumbs/css/ themes/flatgrey...
Author: jleroux
Date: Sat May 15 11:42:01 2010
New Revision: 944614
URL: http://svn.apache.org/viewvc?rev=944614&view=rev
Log:
A patch from Ankit Jain "Layered lookup inside the layered lookup not working" https://issues.apache.org/jira/browse/OFBIZ-3768 - OFBIZ-3768
This patch definitely closes this issue
Modified:
ofbiz/trunk/framework/common/webcommon/includes/lookup.ftl
ofbiz/trunk/framework/images/webapp/images/fieldlookup.js
ofbiz/trunk/themes/bizznesstime/webapp/bizznesstime/css/style.css
ofbiz/trunk/themes/bluelight/webapp/bluelight/style.css
ofbiz/trunk/themes/droppingcrumbs/webapp/droppingcrumbs/css/style.css
ofbiz/trunk/themes/flatgrey/webapp/flatgrey/maincss.css
ofbiz/trunk/themes/tomahawk/webapp/tomahawk/css/style.css
Modified: ofbiz/trunk/framework/common/webcommon/includes/lookup.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/webcommon/includes/lookup.ftl?rev=944614&r1=944613&r2=944614&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/webcommon/includes/lookup.ftl (original)
+++ ofbiz/trunk/framework/common/webcommon/includes/lookup.ftl Sat May 15 11:42:01 2010
@@ -85,7 +85,7 @@ under the License.
src.style.backgroundColor = bkColor;
}
// function passing selected value to calling window
- function set_value(value) {
+ /* function set_value(value) {
if (!obj_caller) return;
setSourceColor(obj_caller.target);
obj_caller.target.value = value;
@@ -95,7 +95,7 @@ under the License.
}
window.close();
}
- // function passing selected value to calling window
+ // function passing selected value to calling window
function set_values(value, value2) {
set_value(value);
if (!obj_caller.target2) return;
@@ -107,7 +107,7 @@ under the License.
obj_caller.target2.onchange();
}
}
- function set_multivalues(value) {
+ */ function set_multivalues(value) {
obj_caller.target.value = value;
var thisForm = obj_caller.target.form;
var evalString = "";
Modified: ofbiz/trunk/framework/images/webapp/images/fieldlookup.js
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/fieldlookup.js?rev=944614&r1=944613&r2=944614&view=diff
==============================================================================
--- ofbiz/trunk/framework/images/webapp/images/fieldlookup.js (original)
+++ ofbiz/trunk/framework/images/webapp/images/fieldlookup.js Sat May 15 11:42:01 2010
@@ -37,6 +37,7 @@ function moveobj(evt) {
var target = null;
var target2 = null;
+var targetW = null;
var lookups =[];
function call_fieldlookup(target, viewName, formName, viewWidth, viewheight) {
@@ -88,7 +89,7 @@ function fieldLookup1(obj_target, args)
if (obj_target.value == null)
return lookup_error("Error calling the field lookup: parameter specified is not valid target control");
//this.target = obj_target;
- target = obj_target;
+ targetW = obj_target;
// register in global collections
//this.id = lookups.length;
@@ -103,7 +104,7 @@ function fieldLookup2(obj_target, obj_ta
return lookup_error("Error calling the field lookup: no target control specified");
if (obj_target.value == null)
return lookup_error("Error calling the field lookup: parameter specified is not valid target control");
- target = obj_target;
+ targetW = obj_target;
// validate input parameters
if (! obj_target2)
return lookup_error("Error calling the field lookup: no target2 control specified");
@@ -323,7 +324,7 @@ var FieldLookupPopup = Class.create({
},
close_on_click: function (evt) {
- if (! Event.element(evt).descendantOf(this.divRef)) {
+ if (this.divRef.previousSiblings().member(Event.element(evt))) {
this.closeLookup(this);
} else {
identifyLookup(this.globalRef);
@@ -360,15 +361,10 @@ var FieldLookupPopup = Class.create({
},
createFadedBackground: function (){
- //remove the faded Background if exists
- var fb = $('fadedBackground')
- if (fb != null) {
- fb.parentNode.removeChild(fb);
- }
-
var pageSize = this.getPageSize();
var fadedBackground = new Element ('DIV', {
- id: "fadedBackground",
+ id: GLOBAL_LOOKUP_REF.createNextKey() + "_fadedBackground",
+ class: "fadedBackground" ,
style: "width: " + pageSize[0] + "px; height: " + pageSize[1] + "px;"
});
@@ -472,7 +468,7 @@ var FieldLookupPopup = Class.create({
Element.stopObserving(document, "mousedown", this.close_on_click);
this.divRef.parentNode.removeChild(this.divRef);
//remove the faded Background if exists
- var fb = $('fadedBackground')
+ var fb = $(this.globalRef + '_fadedBackground')
if (fb != null){
fb.parentNode.removeChild(fb);
}
@@ -845,7 +841,12 @@ function setSourceColor(src) {
}
// function passing selected value to calling window
function set_value (value) {
+ if(GLOBAL_LOOKUP_REF.getReference(ACTIVATED_LOOKUP)){
obj_caller.target = $(GLOBAL_LOOKUP_REF.getReference(ACTIVATED_LOOKUP).parentTarget.id);
+ }
+ else{
+ obj_caller.target = obj_caller.targetW;
+ }
var target = obj_caller.target;
write_value(value, target);
@@ -854,8 +855,13 @@ function set_value (value) {
}
// function passing selected value to calling window
function set_values (value, value2) {
- obj_caller.target = $(GLOBAL_LOOKUP_REF.getReference(ACTIVATED_LOOKUP).parentTarget.id);
- var target = obj_caller.target;
+ if(GLOBAL_LOOKUP_REF.getReference(ACTIVATED_LOOKUP)){
+ obj_caller.target = $(GLOBAL_LOOKUP_REF.getReference(ACTIVATED_LOOKUP).parentTarget.id);
+ }
+ else{
+ obj_caller.target = obj_caller.targetW;
+ }
+ var target = obj_caller.target;
var target2 = obj_caller.target2;
write_value(value, target);
write_value(value2, target2)
@@ -892,7 +898,7 @@ function set_multivalues(value) {
}
//close the window after passing the value
function closeLookup() {
- if (window.opener != null) {
+ if (window.opener != null && GLOBAL_LOOKUP_REF.getReference(ACTIVATED_LOOKUP) == null) {
window.close();
} else {
obj = GLOBAL_LOOKUP_REF.getReference(ACTIVATED_LOOKUP);
Modified: ofbiz/trunk/themes/bizznesstime/webapp/bizznesstime/css/style.css
URL: http://svn.apache.org/viewvc/ofbiz/trunk/themes/bizznesstime/webapp/bizznesstime/css/style.css?rev=944614&r1=944613&r2=944614&view=diff
==============================================================================
--- ofbiz/trunk/themes/bizznesstime/webapp/bizznesstime/css/style.css (original)
+++ ofbiz/trunk/themes/bizznesstime/webapp/bizznesstime/css/style.css Sat May 15 11:42:01 2010
@@ -1463,6 +1463,7 @@ Lookups
overflow: visible;
z-index: 110000;
visibility: visible;
+ display: block !important;
}
.fieldLookupHeader{
@@ -1522,7 +1523,7 @@ Lookups
margin-top: 0;
}
- #fadedBackground {
+ .fadedBackground {
background: url(../images/faded_background.png);
position: absolute;
overflow: visible;
Modified: ofbiz/trunk/themes/bluelight/webapp/bluelight/style.css
URL: http://svn.apache.org/viewvc/ofbiz/trunk/themes/bluelight/webapp/bluelight/style.css?rev=944614&r1=944613&r2=944614&view=diff
==============================================================================
--- ofbiz/trunk/themes/bluelight/webapp/bluelight/style.css (original)
+++ ofbiz/trunk/themes/bluelight/webapp/bluelight/style.css Sat May 15 11:42:01 2010
@@ -2261,7 +2261,7 @@ Lookups
margin-top: 0;
}
- #fadedBackground {
+ .fadedBackground {
background: url(images/faded_background.png);
position: absolute;
overflow: visible;
Modified: ofbiz/trunk/themes/droppingcrumbs/webapp/droppingcrumbs/css/style.css
URL: http://svn.apache.org/viewvc/ofbiz/trunk/themes/droppingcrumbs/webapp/droppingcrumbs/css/style.css?rev=944614&r1=944613&r2=944614&view=diff
==============================================================================
--- ofbiz/trunk/themes/droppingcrumbs/webapp/droppingcrumbs/css/style.css (original)
+++ ofbiz/trunk/themes/droppingcrumbs/webapp/droppingcrumbs/css/style.css Sat May 15 11:42:01 2010
@@ -2239,7 +2239,7 @@ Lookups
margin-top: 0;
}
- #fadedBackground {
+ .fadedBackground {
background: url(../images/faded_background.png);
position: absolute;
overflow: visible;
Modified: ofbiz/trunk/themes/flatgrey/webapp/flatgrey/maincss.css
URL: http://svn.apache.org/viewvc/ofbiz/trunk/themes/flatgrey/webapp/flatgrey/maincss.css?rev=944614&r1=944613&r2=944614&view=diff
==============================================================================
--- ofbiz/trunk/themes/flatgrey/webapp/flatgrey/maincss.css (original)
+++ ofbiz/trunk/themes/flatgrey/webapp/flatgrey/maincss.css Sat May 15 11:42:01 2010
@@ -2288,7 +2288,7 @@ Lookups
margin-top: 0;
}
- #fadedBackground {
+ .fadedBackground {
background: url(faded_background.png);
position: absolute;
overflow: visible;
Modified: ofbiz/trunk/themes/tomahawk/webapp/tomahawk/css/style.css
URL: http://svn.apache.org/viewvc/ofbiz/trunk/themes/tomahawk/webapp/tomahawk/css/style.css?rev=944614&r1=944613&r2=944614&view=diff
==============================================================================
--- ofbiz/trunk/themes/tomahawk/webapp/tomahawk/css/style.css (original)
+++ ofbiz/trunk/themes/tomahawk/webapp/tomahawk/css/style.css Sat May 15 11:42:01 2010
@@ -2445,7 +2445,7 @@ display: inline;
margin-top: 0;
}
-#fadedBackground {
+.fadedBackground {
background: url(../images/faded_background.png);
position: absolute;
overflow: visible;