Author: jleroux
Date: Sat May 15 12:00:37 2010 New Revision: 944618 URL: http://svn.apache.org/viewvc?rev=944618&view=rev Log: "Applied fix from trunk for revision: 944614" ------------------------------------------------------------------------ r944614 | jleroux | 2010-05-15 13:42:01 +0200 (sam. 15 mai 2010) | 3 lignes 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/branches/release10.04/ (props changed) ofbiz/branches/release10.04/framework/common/webcommon/includes/lookup.ftl ofbiz/branches/release10.04/framework/images/webapp/images/fieldlookup.js ofbiz/branches/release10.04/themes/bizznesstime/webapp/bizznesstime/css/style.css ofbiz/branches/release10.04/themes/bluelight/webapp/bluelight/style.css ofbiz/branches/release10.04/themes/droppingcrumbs/webapp/droppingcrumbs/css/style.css ofbiz/branches/release10.04/themes/flatgrey/webapp/flatgrey/maincss.css ofbiz/branches/release10.04/themes/tomahawk/webapp/tomahawk/css/style.css Propchange: ofbiz/branches/release10.04/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Sat May 15 12:00:37 2010 @@ -1,3 +1,3 @@ /ofbiz/branches/addbirt:831210-885099,885686-886087 /ofbiz/branches/multitenant20100310:921280-927264 -/ofbiz/trunk:939988,939990,939999,940025,940053,940234,940248,940309,940401,940410,940425,940779,940815,940849,941007,941047,941109,941177,941199,941261,941440,941600,941999,942084,942406,942414,942671,942883-942884,943168,943271-943272 +/ofbiz/trunk:939988,939990,939999,940025,940053,940234,940248,940309,940401,940410,940425,940779,940815,940849,941007,941047,941109,941177,941199,941261,941440,941600,941999,942084,942406,942414,942671,942883-942884,943168,943271-943272,944614 Modified: ofbiz/branches/release10.04/framework/common/webcommon/includes/lookup.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/release10.04/framework/common/webcommon/includes/lookup.ftl?rev=944618&r1=944617&r2=944618&view=diff ============================================================================== --- ofbiz/branches/release10.04/framework/common/webcommon/includes/lookup.ftl (original) +++ ofbiz/branches/release10.04/framework/common/webcommon/includes/lookup.ftl Sat May 15 12:00:37 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/branches/release10.04/framework/images/webapp/images/fieldlookup.js URL: http://svn.apache.org/viewvc/ofbiz/branches/release10.04/framework/images/webapp/images/fieldlookup.js?rev=944618&r1=944617&r2=944618&view=diff ============================================================================== --- ofbiz/branches/release10.04/framework/images/webapp/images/fieldlookup.js (original) +++ ofbiz/branches/release10.04/framework/images/webapp/images/fieldlookup.js Sat May 15 12:00:37 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/branches/release10.04/themes/bizznesstime/webapp/bizznesstime/css/style.css URL: http://svn.apache.org/viewvc/ofbiz/branches/release10.04/themes/bizznesstime/webapp/bizznesstime/css/style.css?rev=944618&r1=944617&r2=944618&view=diff ============================================================================== --- ofbiz/branches/release10.04/themes/bizznesstime/webapp/bizznesstime/css/style.css (original) +++ ofbiz/branches/release10.04/themes/bizznesstime/webapp/bizznesstime/css/style.css Sat May 15 12:00:37 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/branches/release10.04/themes/bluelight/webapp/bluelight/style.css URL: http://svn.apache.org/viewvc/ofbiz/branches/release10.04/themes/bluelight/webapp/bluelight/style.css?rev=944618&r1=944617&r2=944618&view=diff ============================================================================== --- ofbiz/branches/release10.04/themes/bluelight/webapp/bluelight/style.css (original) +++ ofbiz/branches/release10.04/themes/bluelight/webapp/bluelight/style.css Sat May 15 12:00:37 2010 @@ -2261,7 +2261,7 @@ Lookups margin-top: 0; } - #fadedBackground { + .fadedBackground { background: url(images/faded_background.png); position: absolute; overflow: visible; Modified: ofbiz/branches/release10.04/themes/droppingcrumbs/webapp/droppingcrumbs/css/style.css URL: http://svn.apache.org/viewvc/ofbiz/branches/release10.04/themes/droppingcrumbs/webapp/droppingcrumbs/css/style.css?rev=944618&r1=944617&r2=944618&view=diff ============================================================================== --- ofbiz/branches/release10.04/themes/droppingcrumbs/webapp/droppingcrumbs/css/style.css (original) +++ ofbiz/branches/release10.04/themes/droppingcrumbs/webapp/droppingcrumbs/css/style.css Sat May 15 12:00:37 2010 @@ -2239,7 +2239,7 @@ Lookups margin-top: 0; } - #fadedBackground { + .fadedBackground { background: url(../images/faded_background.png); position: absolute; overflow: visible; Modified: ofbiz/branches/release10.04/themes/flatgrey/webapp/flatgrey/maincss.css URL: http://svn.apache.org/viewvc/ofbiz/branches/release10.04/themes/flatgrey/webapp/flatgrey/maincss.css?rev=944618&r1=944617&r2=944618&view=diff ============================================================================== --- ofbiz/branches/release10.04/themes/flatgrey/webapp/flatgrey/maincss.css (original) +++ ofbiz/branches/release10.04/themes/flatgrey/webapp/flatgrey/maincss.css Sat May 15 12:00:37 2010 @@ -2288,7 +2288,7 @@ Lookups margin-top: 0; } - #fadedBackground { + .fadedBackground { background: url(faded_background.png); position: absolute; overflow: visible; Modified: ofbiz/branches/release10.04/themes/tomahawk/webapp/tomahawk/css/style.css URL: http://svn.apache.org/viewvc/ofbiz/branches/release10.04/themes/tomahawk/webapp/tomahawk/css/style.css?rev=944618&r1=944617&r2=944618&view=diff ============================================================================== --- ofbiz/branches/release10.04/themes/tomahawk/webapp/tomahawk/css/style.css (original) +++ ofbiz/branches/release10.04/themes/tomahawk/webapp/tomahawk/css/style.css Sat May 15 12:00:37 2010 @@ -2445,7 +2445,7 @@ display: inline; margin-top: 0; } -#fadedBackground { +.fadedBackground { background: url(../images/faded_background.png); position: absolute; overflow: visible; |
Free forum by Nabble | Edit this page |