Author: jleroux
Date: Sun Feb 28 09:58:29 2010
New Revision: 917152
URL: http://svn.apache.org/viewvc?rev=917152&view=rev
Log:
This allows to hide the field at left of the lookup button. It may be used to
chain an action without coming back to the original place, so the field make
any sense. In my case reassigning a work effort from a list.
Modified:
ofbiz/trunk/framework/widget/dtd/widget-form.xsd
ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl
Modified: ofbiz/trunk/framework/widget/dtd/widget-form.xsd
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/dtd/widget-form.xsd?rev=917152&r1=917151&r2=917152&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/dtd/widget-form.xsd (original)
+++ ofbiz/trunk/framework/widget/dtd/widget-form.xsd Sun Feb 28 09:58:29 2010
@@ -886,7 +886,7 @@
</xs:element>
<xs:attributeGroup name="attlist.lookup">
<xs:attribute type="xs:string" name="target-form-name" use="required"/>
- <xs:attribute type="xs:positiveInteger" name="size" default="25"/>
+ <xs:attribute type="xs:nonNegativeInteger" name="size" default="25"/>
<xs:attribute type="xs:positiveInteger" name="maxlength"/>
<xs:attribute type="xs:string" name="default-value"/>
<xs:attribute type="xs:string" name="description-field-name"/>
Modified: ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl?rev=917152&r1=917151&r2=917152&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl (original)
+++ ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl Sun Feb 28
09:58:29 2010
@@ -433,7 +433,7 @@
<#macro renderLookupField className alert name value size maxlength id event
action disabled autocomplete descriptionFieldName formName lookupFieldFormName
targetParameterIter imgSrc ajaxUrl ajaxEnabled lookupPresentation lookupWidth
lookupHeight lookupPosition>
<div class="field-lookup"><ul>
-<li><input type="text" <@renderClass className alert /><#if name?has_content>
name="${name}"</#if><#if value?has_content> value="${value}"</#if><#if
size?has_content> size="${size}"</#if><#if maxlength?has_content>
maxlength="${maxlength}"</#if><#if id?has_content> id="${id}"</#if><#rt/><#if
disabled?has_content && disabled> disabled="disabled"</#if><#rt/><#if
event?has_content && action?has_content> ${event}="${action}"</#if><#rt/><#if
autocomplete?has_content> autocomplete="off"</#if>/><#rt/></li>
+<#if size?has_content && size="0"><li><input type="hidden" <#if
name?has_content> name="${name}"/></#if></li><#else><li><input type="text"
<@renderClass className alert /><#if name?has_content> name="${name}"</#if><#if
value?has_content> value="${value}"</#if><#if size?has_content>
size="${size}"</#if><#if maxlength?has_content>
maxlength="${maxlength}"</#if><#if id?has_content> id="${id}"</#if><#rt/><#if
disabled?has_content && disabled> disabled="disabled"</#if><#rt/><#if
event?has_content && action?has_content> ${event}="${action}"</#if><#rt/><#if
autocomplete?has_content> autocomplete="off"</#if>/><#rt/></li></#if>
<li><#if lookupPresentation?has_content && descriptionFieldName?has_content &&
lookupPresentation == "layer">
<a
href="javascript:call_fieldlookupLayer3(document.${formName?html}.${name?html},
document.${formName?html}.${descriptionFieldName},'${lookupFieldFormName}','${lookupWidth}','${lookupHeight}','${lookupPosition}'<#rt/>
<#elseif lookupPresentation?has_content && lookupPresentation == "layer">