svn commit: r1056701 - in /ofbiz/trunk: framework/widget/templates/htmlFormMacroLibrary.ftl specialpurpose/googlebase/webapp/googlebase/find/GoogleBaseAdvancedSearch.ftl

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

svn commit: r1056701 - in /ofbiz/trunk: framework/widget/templates/htmlFormMacroLibrary.ftl specialpurpose/googlebase/webapp/googlebase/find/GoogleBaseAdvancedSearch.ftl

jleroux@apache.org
Author: jleroux
Date: Sat Jan  8 13:14:19 2011
New Revision: 1056701

URL: http://svn.apache.org/viewvc?rev=1056701&view=rev
Log:
A patch from Sascha Rodekamp "Find button is not working in the 'googlebase' application" (https://issues.apache.org/jira/browse/OFBIZ-4068) - OFBIZ-4068

Rohit reported a bug in the jQuery implementation (ecommerce):
The find button is not working in the 'googlebase' application. The 'googlebase' application has a page using which u can to search for product to be submitted to google base. the find button is not submitting the page at all.

Sascha: This issue was related to the Lookup Call. The Form in Google Base hadn't a 'name' tag, so the form could not be found. I changed the target by name to a target by Id call (which is better anyways).

Modified:
    ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl
    ofbiz/trunk/specialpurpose/googlebase/webapp/googlebase/find/GoogleBaseAdvancedSearch.ftl

Modified: ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl?rev=1056701&r1=1056700&r2=1056701&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl (original)
+++ ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl Sat Jan  8 13:14:19 2011
@@ -485,7 +485,7 @@ ${item.description}</span>
     </#if>
     );"></a><#rt>
 <#elseif presentation?has_content && presentation == "window">
-     <a href="javascript:call_fieldlookup2(document.${formName}.${name},'${fieldFormName}', '${presentation}'<#rt/>
+     <a href="javascript:call_fieldlookup2(document.${formName?html}.${name?html},'${fieldFormName}', '${presentation}'<#rt/>
     <#if targetParameterIter?has_content>
      <#list targetParameterIter as item>
     ,document.${formName}.${item}.value<#rt>
@@ -509,7 +509,7 @@ ${item.description}</span>
     </#if>
     <script type="text/javascript">
         jQuery(document).ready(function(){
-            new ConstructLookup("${fieldFormName}", "${id}", document.${formName?html}.${name?html}, <#if descriptionFieldName?has_content>document.${formName?html}.${descriptionFieldName}<#else>null</#if>, "${formName?html}", "${width}", "${height}", "${position}", "${fadeBackground}", <#if ajaxEnabled?has_content && ajaxEnabled>"${ajaxUrl}", "${showDescription}"<#else>"", ""</#if>, '${presentation!}');
+            new ConstructLookup("${fieldFormName}", "${id}", document.getElementById("${id}"), <#if descriptionFieldName?has_content>document.getElementById("${formName}_${descriptionFieldName}")<#else>null</#if>, "${formName?html}", "${width}", "${height}", "${position}", "${fadeBackground}", <#if ajaxEnabled?has_content && ajaxEnabled>"${ajaxUrl}", "${showDescription}"<#else>"", ""</#if>, '${presentation!}');
         });
     </script>
 </#if>

Modified: ofbiz/trunk/specialpurpose/googlebase/webapp/googlebase/find/GoogleBaseAdvancedSearch.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/googlebase/webapp/googlebase/find/GoogleBaseAdvancedSearch.ftl?rev=1056701&r1=1056700&r2=1056701&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/googlebase/webapp/googlebase/find/GoogleBaseAdvancedSearch.ftl (original)
+++ ofbiz/trunk/specialpurpose/googlebase/webapp/googlebase/find/GoogleBaseAdvancedSearch.ftl Sat Jan  8 13:14:19 2011
@@ -377,7 +377,7 @@ under the License.
           <tr>
             <td align="center" colspan="2">
               <hr />
-              <a href="javascript:submit(document.getElementById('advToKeywordSearchform'));" class="buttontext">${uiLabelMap.CommonFind}</a>
+              <a href="javascript:submit('advToKeywordSearchform');" class="buttontext">${uiLabelMap.CommonFind}</a>
             </td>
           </tr>
         </table>