Author: jleroux
Date: Fri May 7 14:27:26 2010
New Revision: 942084
URL:
http://svn.apache.org/viewvc?rev=942084&view=revLog:
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/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=942084&r1=942083&r2=942084&view=diff==============================================================================
--- ofbiz/trunk/framework/images/webapp/images/fieldlookup.js (original)
+++ ofbiz/trunk/framework/images/webapp/images/fieldlookup.js Fri May 7 14:27:26 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;