Author: erwan
Date: Wed Jul 21 12:10:08 2010 New Revision: 966202 URL: http://svn.apache.org/viewvc?rev=966202&view=rev Log: Adding event and action attributes to date-time field Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java ofbiz/trunk/framework/widget/templates/foFormMacroLibrary.ftl ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl ofbiz/trunk/framework/widget/templates/textFormMacroLibrary.ftl ofbiz/trunk/framework/widget/templates/xmlFormMacroLibrary.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=966202&r1=966201&r2=966202&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 Wed Jul 21 12:10:08 2010 @@ -493,6 +493,8 @@ public class MacroFormRenderer implement String className = ""; String alert = "false"; String name = ""; + String event = modelFormField.getEvent(); + String action = modelFormField.getAction(context); if (UtilValidate.isNotEmpty(modelFormField.getWidgetStyle())) { className = modelFormField.getWidgetStyle(); if (modelFormField.shouldBeRed(context)) { @@ -629,6 +631,10 @@ public class MacroFormRenderer implement sr.append(value); sr.append("\" id=\""); sr.append(id); + sr.append("\" event=\""); + sr.append(event); + sr.append("\" action=\""); + sr.append(action); sr.append("\" dateType=\""); sr.append(dateTimeField.getType()); sr.append("\" shortDateInput="); Modified: ofbiz/trunk/framework/widget/templates/foFormMacroLibrary.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/templates/foFormMacroLibrary.ftl?rev=966202&r1=966201&r2=966202&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/templates/foFormMacroLibrary.ftl (original) +++ ofbiz/trunk/framework/widget/templates/foFormMacroLibrary.ftl Wed Jul 21 12:10:08 2010 @@ -52,7 +52,7 @@ under the License. <#macro renderTextareaField name className alert cols rows id readonly value visualEdtiorEnalble buttons><@makeBlock className value /></#macro> -<#macro renderDateTimeField name className alert title value size maxlength id dateType shortDateInput timeDropdownParamName defaultDateTimeString localizedIconTitle timeDropdown timeHourName classString hour1 hour2 timeMinutesName minutes isTwelveHour ampmName amSelected pmSelected compositeType formName><@makeBlock className value /></#macro> +<#macro renderDateTimeField name className alert title value size maxlength id event action dateType shortDateInput timeDropdownParamName defaultDateTimeString localizedIconTitle timeDropdown timeHourName classString hour1 hour2 timeMinutesName minutes isTwelveHour ampmName amSelected pmSelected compositeType formName><@makeBlock className value /></#macro> <#macro renderDropDownField name className alert id multiple formName otherFieldName event action size firstInList currentValue explicitDescription allowEmpty options fieldName otherFieldName otherValue otherFieldSize dDFCurrent ajaxEnabled noCurrentSelectedKey ajaxOptions frequency minChars choices autoSelect partialSearch partialChars ignoreCase fullSearch> <#if currentValue?has_content && firstInList?has_content> Modified: ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl?rev=966202&r1=966201&r2=966202&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl (original) +++ ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl Wed Jul 21 12:10:08 2010 @@ -81,9 +81,9 @@ under the License. </#if> </#macro> -<#macro renderDateTimeField name className alert title value size maxlength id dateType shortDateInput timeDropdownParamName defaultDateTimeString localizedIconTitle timeDropdown timeHourName classString hour1 hour2 timeMinutesName minutes isTwelveHour ampmName amSelected pmSelected compositeType formName> +<#macro renderDateTimeField name className alert title value size maxlength id event action dateType shortDateInput timeDropdownParamName defaultDateTimeString localizedIconTitle timeDropdown timeHourName classString hour1 hour2 timeMinutesName minutes isTwelveHour ampmName amSelected pmSelected compositeType formName> <span class="view-calendar"> - <input type="text" name="${name}" <@renderClass className alert /><#rt/> + <input type="text" name="${name}" <#if event?has_content && action?has_content> ${event}="${action}"</#if> <@renderClass className alert /><#rt/> <#if title?has_content> title="${title}"</#if> <#if value?has_content> value="${value}"</#if> <#if size?has_content> size="${size}"</#if><#rt/> Modified: ofbiz/trunk/framework/widget/templates/textFormMacroLibrary.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/templates/textFormMacroLibrary.ftl?rev=966202&r1=966201&r2=966202&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/templates/textFormMacroLibrary.ftl (original) +++ ofbiz/trunk/framework/widget/templates/textFormMacroLibrary.ftl Wed Jul 21 12:10:08 2010 @@ -28,7 +28,7 @@ under the License. <#macro renderTextareaField name className alert cols rows id readonly value visualEdtiorEnalble buttons><@renderField value /></#macro> -<#macro renderDateTimeField name className alert title value size maxlength id dateType shortDateInput timeDropdownParamName defaultDateTimeString localizedIconTitle timeDropdown timeHourName classString hour1 hour2 timeMinutesName minutes isTwelveHour ampmName amSelected pmSelected compositeType formName><@renderField value /></#macro> +<#macro renderDateTimeField name className alert title value size maxlength id event action dateType shortDateInput timeDropdownParamName defaultDateTimeString localizedIconTitle timeDropdown timeHourName classString hour1 hour2 timeMinutesName minutes isTwelveHour ampmName amSelected pmSelected compositeType formName><@renderField value /></#macro> <#macro renderDropDownField name className alert id multiple formName otherFieldName event action size firstInList currentValue explicitDescription allowEmpty options fieldName otherFieldName otherValue otherFieldSize dDFCurrent ajaxEnabled noCurrentSelectedKey ajaxOptions frequency minChars choices autoSelect partialSearch partialChars ignoreCase fullSearch> <#if currentValue?has_content && firstInList?has_content> Modified: ofbiz/trunk/framework/widget/templates/xmlFormMacroLibrary.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/templates/xmlFormMacroLibrary.ftl?rev=966202&r1=966201&r2=966202&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/templates/xmlFormMacroLibrary.ftl (original) +++ ofbiz/trunk/framework/widget/templates/xmlFormMacroLibrary.ftl Wed Jul 21 12:10:08 2010 @@ -44,7 +44,7 @@ under the License. <#macro renderTextareaField name className alert cols rows id readonly value visualEdtiorEnalble buttons><@renderField value/></#macro> -<#macro renderDateTimeField name className alert title value size maxlength id dateType shortDateInput timeDropdownParamName defaultDateTimeString localizedIconTitle timeDropdown timeHourName classString hour1 hour2 timeMinutesName minutes isTwelveHour ampmName amSelected pmSelected compositeType formName><@renderField value/></#macro> +<#macro renderDateTimeField name className alert title value size maxlength id event action dateType shortDateInput timeDropdownParamName defaultDateTimeString localizedIconTitle timeDropdown timeHourName classString hour1 hour2 timeMinutesName minutes isTwelveHour ampmName amSelected pmSelected compositeType formName><@renderField value/></#macro> <#macro renderDropDownField name className alert id multiple formName otherFieldName event action size firstInList currentValue explicitDescription allowEmpty options fieldName otherFieldName otherValue otherFieldSize dDFCurrent ajaxEnabled noCurrentSelectedKey ajaxOptions frequency minChars choices autoSelect partialSearch partialChars ignoreCase fullSearch> </#macro> |
Free forum by Nabble | Edit this page |