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:42 UTC

svn commit: r1641168 - in /ofbiz/branches/release13.07: ./ framework/widget/templates/htmlFormMacroLibrary.ftl

Author: jleroux
Date: Sun Nov 23 08:58:42 2014
New Revision: 1641168

URL: http://svn.apache.org/r1641168
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/release13.07/   (props changed)
    ofbiz/branches/release13.07/framework/widget/templates/htmlFormMacroLibrary.ftl

Propchange: ofbiz/branches/release13.07/
------------------------------------------------------------------------------
  Merged /ofbiz/trunk:r1641165

Modified: ofbiz/branches/release13.07/framework/widget/templates/htmlFormMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/framework/widget/templates/htmlFormMacroLibrary.ftl?rev=1641168&r1=1641167&r2=1641168&view=diff
==============================================================================
--- ofbiz/branches/release13.07/framework/widget/templates/htmlFormMacroLibrary.ftl (original)
+++ ofbiz/branches/release13.07/framework/widget/templates/htmlFormMacroLibrary.ftl Sun Nov 23 08:58:42 2014
@@ -125,12 +125,12 @@ under the License.
           var initDate = <#if value?has_content>jQuery("#${id}").val()<#else>""</#if>;
           if (initDate != "") {
             var dateFormat = Date.CultureInfo.formatPatterns.shortDate<#if shortDateInput?exists && !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);
             }
-            var ofbizTime = "<#if shortDateInput?exists && shortDateInput>yyyy-MM-dd<#else>yyyy-MM-dd HH:mm:ss</#if>";
+            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);
             jQuery("#${id}_i18n").val(formatedObj);