You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by le...@apache.org on 2009/11/12 23:06:35 UTC

svn commit: r835585 - in /ofbiz/trunk/framework/widget: src/org/ofbiz/widget/form/MacroFormRenderer.java templates/htmlFormMacroLibrary.ftl

Author: lektran
Date: Thu Nov 12 22:06:34 2009
New Revision: 835585

URL: http://svn.apache.org/viewvc?rev=835585&view=rev
Log:
Span elements weren't being created for the ajax in place editor, fixes OFBIZ-2494 reported by Jacques Le Roux
Also removed inPlaceEditorId from the code since it is always equal to idName anyway

Modified:
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java
    ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl

Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java?rev=835585&r1=835584&r2=835585&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java Thu Nov 12 22:06:34 2009
@@ -213,8 +213,6 @@
                     }
                 }
             }
-            sr.append("\" inPlaceEditorId=\"");
-            sr.append(idName);
             sr.append("\" inPlaceEditorUrl=\"");
             sr.append(url);
             sr.append("\" inPlaceEditorParams=\"");

Modified: ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl?rev=835585&r1=835584&r2=835585&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl (original)
+++ ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl Thu Nov 12 22:06:34 2009
@@ -23,8 +23,8 @@
     </#if>
 </#macro>
 
-<#macro renderDisplayField idName description class alert inPlaceEditorId="" inPlaceEditorUrl="" inPlaceEditorParams="">
-    <#if class?has_content || alert=="true">
+<#macro renderDisplayField idName description class alert inPlaceEditorUrl="" inPlaceEditorParams="">
+    <#if inPlaceEditorUrl?has_content || class?has_content || alert=="true">
         <span <#if idName?has_content>id="${idName}"</#if> <@renderClass class alert />><#t/>
     </#if>
     <#if description?has_content>
@@ -32,12 +32,12 @@
     <#else>
         &nbsp;<#t/>
     </#if>
-    <#if class?has_content || alert=="true">
+    <#if inPlaceEditorUrl?has_content || class?has_content || alert=="true">
         </span><#lt/>
     </#if>
-    <#if inPlaceEditorId?has_content>
+    <#if inPlaceEditorUrl?has_content && idName?has_content>
         <script language="JavaScript" type="text/javascript"><#lt/>
-        ajaxInPlaceEditDisplayField('${inPlaceEditorId}', '${inPlaceEditorUrl}', ${inPlaceEditorParams});<#lt/>
+        ajaxInPlaceEditDisplayField('${idName}', '${inPlaceEditorUrl}', ${inPlaceEditorParams});<#lt/>
         </script><#lt/>
     </#if>
 </#macro>