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/07 16:32:41 UTC

svn commit: r942086 - in /ofbiz/branches/release10.04: ./ framework/images/webapp/images/fieldlookup.js

Author: jleroux
Date: Fri May  7 14:32:41 2010
New Revision: 942086

URL: http://svn.apache.org/viewvc?rev=942086&view=rev
Log:
"Applied fix from trunk for revision: 942084" 
------------------------------------------------------------------------
r942084 | jleroux | 2010-05-07 16:27:26 +0200 (ven. 07 mai 2010) | 3 lignes

A patch from Sascha Rodekamp "The minimize/enlarge buttons (+ -) blocks the layer" (https://issues.apache.org/jira/browse/OFBIZ-3692) - OFBIZ-3692

This fixes the last issue with the FTL layered lookups but is actually more general as it uses a 1999 origin when the HtmlScreenRendere class uses 999.
------------------------------------------------------------------------


Modified:
    ofbiz/branches/release10.04/   (props changed)
    ofbiz/branches/release10.04/framework/images/webapp/images/fieldlookup.js

Propchange: ofbiz/branches/release10.04/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri May  7 14:32:41 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,941177,941199,941261,941440,941600,941999
+/ofbiz/trunk:939988,939990,939999,940025,940053,940234,940248,940309,940401,940410,940425,940779,940815,940849,941007,941177,941199,941261,941440,941600,941999,942084

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=942086&r1=942085&r2=942086&view=diff
==============================================================================
--- ofbiz/branches/release10.04/framework/images/webapp/images/fieldlookup.js (original)
+++ ofbiz/branches/release10.04/framework/images/webapp/images/fieldlookup.js Fri May  7 14:32:41 2010
@@ -554,9 +554,51 @@ function hideLookup() {
     obj.closeLookup();
 }
 
+//global expand/col button var
+var COLLAPSE = 1999;
+function getNextCollapseSeq() {
+	COLLAPSE++;
+	return COLLAPSE;
+}
+
+//modify epande/ collapse button
+function modifyCollapseable(lookupDiv){
+	if (!lookupDiv) {
+		return;
+	}
+	
+    var slTitleBars = lookupDiv.getElementsByClassName('screenlet-title-bar');
+    for (i in slTitleBars) {
+    	var slTitleBar = slTitleBars[i];
+    	
+    	var ul = slTitleBar.firstChild;
+
+    	if ((typeof ul) != 'object') {
+    		continue;
+    	}
+
+    	var childElements = ul.childNodes;
+    	for (j in childElements) {
+    		if (childElements[j].className == 'expanded' ||childElements[j].className == 'collapsed') {
+    			break;
+    		}
+    	}
+    	
+    	getNextCollapseSeq();
+    	var childEle = childElements[j].firstChild;
+    	childEle.onclick = function () {
+    		toggleScreenlet(childEle, 'lec' + COLLAPSE, 'true', 'Expand', 'Collapse');
+    	};
+    	slTitleBar.next('div').setAttribute('id', 'lec' + COLLAPSE);
+    	
+    } 
+}
+
 function modifySubmitButton (lookupDiv) {
 	/* changes form/submit behavior for Lookup Layer */
     if (lookupDiv) {
+        modifyCollapseable(lookupDiv);
+    	
         //find the lookup form
         var forms = lookupDiv.getElementsByTagName('form');
         var lookupForm = null;