svn commit: r1081444 - in /ofbiz/trunk/framework/widget: src/org/ofbiz/widget/form/MacroFormRenderer.java 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: r1081444 - in /ofbiz/trunk/framework/widget: src/org/ofbiz/widget/form/MacroFormRenderer.java templates/htmlFormMacroLibrary.ftl

erwan
Author: erwan
Date: Mon Mar 14 16:23:34 2011
New Revision: 1081444

URL: http://svn.apache.org/viewvc?rev=1081444&view=rev
Log:
Corrected a bug due to millis with the input mask, optimizing the jQuery writing for the mask

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=1081444&r1=1081443&r2=1081444&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 Mon Mar 14 16:23:34 2011
@@ -625,7 +625,7 @@ public class MacroFormRenderer implement
             } else if ("time".equals(dateTimeField.getType())) {
                 formattedMask = "99:99:99";
             } else if ("timestamp".equals(dateTimeField.getType())) {
-                formattedMask = "9999-99-99 99:99:99.999";
+                formattedMask = "9999-99-99 99:99:99";
             }
         }
         StringWriter sr = new StringWriter();

Modified: ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl?rev=1081444&r1=1081443&r2=1081444&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl (original)
+++ ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl Mon Mar 14 16:23:34 2011
@@ -102,11 +102,6 @@ under the License.
 
 <#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 mask="" event="" action="" step="" timeValues="">
   <span class="view-calendar">
-      <#if mask?has_content>
-          <script type="text/javascript">
-            jQuery(function($){jQuery("#${id}").mask("${mask}");});
-          </script>
-      </#if>
       <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>
@@ -130,7 +125,9 @@ under the License.
                     buttonText: '',
                     buttonImageOnly: false,
                     dateFormat: 'yy-mm-dd'
-                  });
+                  })
+              <#if mask?has_content>.mask("${mask}")</#if>
+              ;
           </script>
       </#if>
       <#if timeDropdown?has_content && timeDropdown=="time-dropdown">