svn commit: r1036154 [1/5] - in /ofbiz/branches/jquery: framework/common/widget/ framework/images/webapp/images/ framework/images/webapp/images/jquery/ specialpurpose/ecommerce/widget/ specialpurpose/webpos/widget/

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1036154 [1/5] - in /ofbiz/branches/jquery: framework/common/widget/ framework/images/webapp/images/ framework/images/webapp/images/jquery/ specialpurpose/ecommerce/widget/ specialpurpose/webpos/widget/

jleroux@apache.org
Author: jleroux
Date: Wed Nov 17 18:21:16 2010
New Revision: 1036154

URL: http://svn.apache.org/viewvc?rev=1036154&view=rev
Log:
Today in a custom app we experienced a weird issue. We use Ajax (actually "jQuery load") to dynamically load FTL forms which contains lookups. For this to work, we made a small change in the fieldlookup.js script by adding "jQuery live" on the lookup button related click(allow future associations)

It happened that today the lookups build from the load request (Ajax) did not work anymore, nor the other lookups. It was working a week ago and we discovered that was due to the update of jQuery (to 1.4.4 this week and 1.4.3 last week). So I have reverted the calls to the jQuery lib to 1.4.2. I will report the problem to the jQuery team (nothing like that seems to be known for now on the Internet).

This commit introduces
* the "jQuery live" change in fieldlookup.js script
* revert calls to the jQuery lib from 1.4.4 version to 1.4.2
* in order to help investigations put back jQuery libs 1.4.2 and 1.4.3

Added:
    ofbiz/branches/jquery/framework/images/webapp/images/jquery/jquery-1.4.2.js   (with props)
    ofbiz/branches/jquery/framework/images/webapp/images/jquery/jquery-1.4.2.min.js   (with props)
    ofbiz/branches/jquery/framework/images/webapp/images/jquery/jquery-1.4.3.js   (with props)
    ofbiz/branches/jquery/framework/images/webapp/images/jquery/jquery-1.4.3.min.js   (with props)
Modified:
    ofbiz/branches/jquery/framework/common/widget/CommonScreens.xml
    ofbiz/branches/jquery/framework/images/webapp/images/fieldlookup.js
    ofbiz/branches/jquery/specialpurpose/ecommerce/widget/CommonScreens.xml
    ofbiz/branches/jquery/specialpurpose/webpos/widget/CommonScreens.xml

Modified: ofbiz/branches/jquery/framework/common/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/common/widget/CommonScreens.xml?rev=1036154&r1=1036153&r2=1036154&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/common/widget/CommonScreens.xml (original)
+++ ofbiz/branches/jquery/framework/common/widget/CommonScreens.xml Wed Nov 17 18:21:16 2010
@@ -124,7 +124,7 @@ under the License.
                 <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/ui/development-bundle/ui/jquery.ui.datepicker.js" global="true"/>
                 <set field="initialLocale" type="String" value="${parameters.userLogin.lastLocale}" default-value="${groovy:locale.toString()}"/>
                 <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/ui/development-bundle/ui/i18n/jquery.ui.datepicker-${initialLocale}.js" global="true"/>
-                <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/jquery-1.4.4.min.js" global="true"/>
+                <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/jquery-1.4.2.min.js" global="true"/>
                     <!-- jQuery CSSs -->
                 <set field="layoutSettings.styleSheets[+0]" value="/images/jquery/plugins/asmselect/jquery.asmselect-1.0.4a-beta.css" global="true"/>
 
@@ -338,7 +338,7 @@ under the License.
                 <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/ui/development-bundle/ui/jquery.ui.datepicker.js" global="true"/>
                 <set field="initialLocale" type="String" value="${parameters.userLogin.lastLocale}" default-value="${groovy:locale.toString()}"/>
                 <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/ui/development-bundle/ui/i18n/jquery.ui.datepicker-${initialLocale}.js" global="true"/>
-                <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/jquery-1.4.4.min.js" global="true"/>
+                <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/jquery-1.4.2.min.js" global="true"/>
                     <!-- jQuery CSSs -->
                 <set field="layoutSettings.styleSheets[+0]" value="/images/jquery/plugins/asmselect/jquery.asmselect-1.0.4a-beta.css" global="true"/>
 

Modified: ofbiz/branches/jquery/framework/images/webapp/images/fieldlookup.js
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/images/webapp/images/fieldlookup.js?rev=1036154&r1=1036153&r2=1036154&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/images/webapp/images/fieldlookup.js (original)
+++ ofbiz/branches/jquery/framework/images/webapp/images/fieldlookup.js Wed Nov 17 18:21:16 2010
@@ -273,7 +273,7 @@ function ConstructLookup(requestUrl, inp
     GLOBAL_LOOKUP_REF.setReference(lookupId, this);
     
     // bind click Event to Dialog button
-    jQuery("#" + lookupId + "_button").click(
+    jQuery("#" + lookupId + "_button").live('click',  
         function (){
             jQuery("#" + lookupId).dialog("open");
             jQuery("#" + lookupId).dialog(dialogOpts);