Author: jleroux
Date: Sun May 23 15:08:57 2010
New Revision: 947424
URL:
http://svn.apache.org/viewvc?rev=947424&view=revLog:
A patch from Sascha Rodekamp " Calendar Don't open in Lookups" (
https://issues.apache.org/jira/browse/OFBIZ-3692) - OFBIZ-3780
After all the last Patches the calendar didn't opened in the lookups ... But here is the fix.
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=947424&r1=947423&r2=947424&view=diff==============================================================================
--- ofbiz/trunk/framework/images/webapp/images/fieldlookup.js (original)
+++ ofbiz/trunk/framework/images/webapp/images/fieldlookup.js Sun May 23 15:08:57 2010
@@ -615,6 +615,15 @@ function modifySubmitButton (lookupDiv)
var replaced = new RegExp('document.' + oldFormName, 'g');
newLookup.getElementsByTagName('a')[0].href = link.replace(replaced, 'document.'+'form_' + GLOBAL_LOOKUP_REF.getReference(ACTIVATED_LOOKUP).globalRef);
});
+
+ //set new calendar links
+ newLookups = $A(lookupDiv.getElementsByClassName('view-calendar'));
+ newLookups.each(function(newLookup){
+ link = $A(newLookup.getElementsByTagName('a'));
+ link.each(function(cal){
+ cal.href = cal.href.replace('document.' + oldFormName, 'document.'+'form_' + GLOBAL_LOOKUP_REF.getReference(ACTIVATED_LOOKUP).globalRef);
+ });
+ });
//disable the form action
var formAction = lookupForm.getAttribute('action');