svn commit: r1369562 - in /ofbiz/branches/release12.04: ./ framework/widget/templates/htmlFormMacroLibrary.ftl

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

svn commit: r1369562 - in /ofbiz/branches/release12.04: ./ framework/widget/templates/htmlFormMacroLibrary.ftl

jleroux@apache.org
Author: jleroux
Date: Sun Aug  5 11:51:46 2012
New Revision: 1369562

URL: http://svn.apache.org/viewvc?rev=1369562&view=rev
Log:
"Applied fix from trunk for revision: 1369561  " (conflict handled by hand)
------------------------------------------------------------------------
r1369561 | jleroux | 2012-08-05 13:48:44 +0200 (dim., 05 août 2012) | 5 lines

renderLookupField macro comments improvement
Simple formatting (tabs to 2 spaces)
Fixes a bug which prevented to show an i18n "clear" text when layered lookups were used in read only mode from FTL templates
Fixes a bug which prevented to clear the description (at right of button) when layered lookups were used in read only mode

------------------------------------------------------------------------


Modified:
    ofbiz/branches/release12.04/   (props changed)
    ofbiz/branches/release12.04/framework/widget/templates/htmlFormMacroLibrary.ftl

Propchange: ofbiz/branches/release12.04/
------------------------------------------------------------------------------
  Merged /ofbiz/trunk:r1369561

Modified: ofbiz/branches/release12.04/framework/widget/templates/htmlFormMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/release12.04/framework/widget/templates/htmlFormMacroLibrary.ftl?rev=1369562&r1=1369561&r2=1369562&view=diff
==============================================================================
--- ofbiz/branches/release12.04/framework/widget/templates/htmlFormMacroLibrary.ftl (original)
+++ ofbiz/branches/release12.04/framework/widget/templates/htmlFormMacroLibrary.ftl Sun Aug  5 11:51:46 2012
@@ -591,8 +591,8 @@ Parameter: width, String or Integer, opt
 Parameter: height, String or Integer, optional - The height of the lookup field.
 Parameter: position, String, optional - The position style of the lookup field.
 Parameter: fadeBackground, ?
-Parameter: clearText, String, optional - If the readonly parameter is true, clearText contains the text to be displayed in the field.
-Parameter: showDescription, String, optional - ? (contains "true" or "false").
+Parameter: clearText, String, optional - If the readonly parameter is true, clearText contains the text to be displayed in the field, default is CommonClear label.
+Parameter: showDescription, String, optional - If the showDescription parameter is true, a special span with css class "tooltip" will be created at right of the lookup button and a description will fill in (see setLookDescription in selectall.js). For now not when the lookup is read only.
 Parameter: initiallyCollapsed, Not used.
 Parameter: lastViewName, String, optional - If the ajaxEnabled parameter is true, the contents of lastViewName will be appended to the Ajax URL.
 -->
@@ -672,7 +672,17 @@ Parameter: lastViewName, String, optiona
         });
     </script>
 </#if>
-<#if readonly?has_content && readonly><a id="${id}_clear" style="background:none;margin-left:5px;margin-right:15px;" class="clearField" href="javascript:void(0);" onclick="javascript:document.${formName}.${name}.value='';<#if descriptionFieldName?has_content>document.${formName}.${descriptionFieldName}.value='';</#if>">${clearText}</a></#if>
+<#if readonly?has_content && readonly>
+  <a id="${id}_clear"
+      style="background:none;margin-left:5px;margin-right:15px;"
+      class="clearField"
+      href="javascript:void(0);"
+      onclick="javascript:document.${formName}.${name}.value='';
+              jQuery('#' + jQuery('#${id}_clear').next().attr('id').replace('_button','') + '_${id}_lookupDescription').html('');
+              <#if descriptionFieldName?has_content>document.${formName}.${descriptionFieldName}.value='';</#if>">
+      <#if clearText?has_content>${clearText}<#else>${uiLabelMap.CommonClear}</#if>
+  </a>
+</#if>
 </span>
 <#if ajaxEnabled?has_content && ajaxEnabled && (presentation?has_content && presentation == "window")>
       <#if ajaxUrl?index_of("_LAST_VIEW_NAME_") < 0>