You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2014/11/23 09:58:50 UTC

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

Author: jleroux
Date: Sun Nov 23 08:58:50 2014
New Revision: 1641169

URL: http://svn.apache.org/r1641169
Log:
"Applied fix from trunk for revision: 1641165" 
------------------------------------------------------------------------
r1641165 | jleroux | 2014-11-23 09:49:48 +0100 (dim. 23 nov. 2014) | 1 ligne

It's not quite clear to me why Date.CultureInfo.formatPatterns.longTime from date.js returns ms (always .000 it seems). I don't know if this would not happen, but anyway I prefer to assign the value to the calendar out of the block which changes the value.
------------------------------------------------------------------------


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

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

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=1641169&r1=1641168&r2=1641169&view=diff
==============================================================================
--- ofbiz/branches/release12.04/framework/widget/templates/htmlFormMacroLibrary.ftl (original)
+++ ofbiz/branches/release12.04/framework/widget/templates/htmlFormMacroLibrary.ftl Sun Nov 23 08:58:50 2014
@@ -125,11 +125,11 @@ under the License.
           var initDate = <#if value?has_content>jQuery("#${id}").val()<#else>""</#if>;
           if (initDate != "") {
             var dateFormat = Date.CultureInfo.formatPatterns.shortDate<#if shortDateInput?? && !shortDateInput> + " " + Date.CultureInfo.formatPatterns.longTime</#if>;
-            <#-- The JS date parser doesn't understand the dot before ms in the date/time string. The ms here should be always 0 -->
+            <#-- The JS date parser doesn't understand the dot before ms in the date/time string. The ms here should be always 000 -->
             if (initDate.indexOf('.') != -1) {
               initDate = initDate.substring(0, initDate.indexOf('.'));
-              jQuery("#${id}").val(initDate);
             }
+            jQuery("#${id}").val(initDate);
             var ofbizTime = "<#if shortDateInput?? && shortDateInput>yyyy-MM-dd<#else>yyyy-MM-dd HH:mm:ss</#if>";
             var dateObj = Date.parseExact(initDate, ofbizTime);
             var formatedObj = dateObj.toString(dateFormat);