Return-Path: X-Original-To: apmail-ofbiz-dev-archive@www.apache.org Delivered-To: apmail-ofbiz-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 699181141E for ; Tue, 2 Sep 2014 16:03:17 +0000 (UTC) Received: (qmail 54554 invoked by uid 500); 2 Sep 2014 16:03:17 -0000 Delivered-To: apmail-ofbiz-dev-archive@ofbiz.apache.org Received: (qmail 54527 invoked by uid 500); 2 Sep 2014 16:03:17 -0000 Mailing-List: contact dev-help@ofbiz.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ofbiz.apache.org Delivered-To: mailing list dev@ofbiz.apache.org Received: (qmail 54516 invoked by uid 99); 2 Sep 2014 16:03:16 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Sep 2014 16:03:16 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [212.83.146.160] (HELO choapas.atasta.net) (212.83.146.160) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Sep 2014 16:02:50 +0000 Received: from localhost (localhost [127.0.0.1]) by choapas.atasta.net (Postfix) with ESMTP id 629B9A10BC for ; Tue, 2 Sep 2014 17:58:32 +0200 (CEST) X-Virus-Scanned: amavisd-new at example.com Received: from choapas.atasta.net ([127.0.0.1]) by localhost (choapas.atasta.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3jVcp4S-XvEs for ; Tue, 2 Sep 2014 17:58:21 +0200 (CEST) Received: from [192.168.0.52] (maison.tigres-rouges.net [82.66.35.44]) (Authenticated sender: desoutter) by choapas.atasta.net (Postfix) with ESMTPSA id 1ABB8A100C for ; Tue, 2 Sep 2014 17:58:20 +0200 (CEST) Message-ID: <5405EA17.1060302@atasta.net> Date: Tue, 02 Sep 2014 18:02:31 +0200 From: =?UTF-8?B?Q2hsb8OpIERlc291dHRlcg==?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: dev@ofbiz.apache.org Subject: [Patch] Fix the timeformat Content-Type: multipart/mixed; boundary="------------090608090009020202070405" X-Virus-Checked: Checked by ClamAV on apache.org --------------090608090009020202070405 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Dear, I have noticed that current release is not usable as the timeformat is wrong for the datetimepicker. Attached is a patch (extract from our local Git repository). Yours sincerely -- ChloƩ Desoutter C[A-Z]O, Atasta NET --------------090608090009020202070405 Content-Type: text/x-patch; name="fix-timeformat.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="fix-timeformat.patch" >From e0b42d558522c9afd0c8cc45a08c1b5e577e7e0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chlo=C3=A9=20Desoutter?= Date: Fri, 5 Sep 2014 14:46:08 +0200 Subject: [PATCH] Fixed timeformat (HH > hh) --- .../framework/widget/templates/htmlFormMacroLibrary.ftl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apache-ofbiz-12.04.04/framework/widget/templates/htmlFormMacroLibrary.ftl b/apache-ofbiz-12.04.04/framework/widget/templates/htmlFormMacroLibrary.ftl index ceda2d8..4263129 100644 --- a/apache-ofbiz-12.04.04/framework/widget/templates/htmlFormMacroLibrary.ftl +++ b/apache-ofbiz-12.04.04/framework/widget/templates/htmlFormMacroLibrary.ftl @@ -129,14 +129,14 @@ under the License. if (initDate.indexOf('.') != -1) { initDate = initDate.substring(0, initDate.indexOf('.')); } - var ofbizTime = "<#if shortDateInput?exists && shortDateInput>yyyy-MM-dd<#else>yyyy-MM-dd HH:mm:ss"; + var ofbizTime = "<#if shortDateInput?exists && shortDateInput>yyyy-MM-dd<#else>yyyy-MM-dd hh:mm:ss"; var dateObj = Date.parseExact(initDate, ofbizTime); var formatedObj = dateObj.toString(dateFormat); jQuery("#${id}_i18n").val(formatedObj); } jQuery("#${id}").change(function() { - var ofbizTime = "<#if shortDateInput?exists && shortDateInput>yyyy-MM-dd<#else>yyyy-MM-dd HH:mm:ss"; + var ofbizTime = "<#if shortDateInput?exists && shortDateInput>yyyy-MM-dd<#else>yyyy-MM-dd hh:mm:ss"; var newValue = "" if (this.value != "") { var dateObj = Date.parseExact(this.value, ofbizTime); @@ -150,7 +150,7 @@ under the License. var newValue = "" if (this.value != "") { var dateObj = Date.parseExact(this.value, dateFormat); - var ofbizTime = "<#if shortDateInput?exists && shortDateInput>yyyy-MM-dd<#else>yyyy-MM-dd HH:mm:ss"; + var ofbizTime = "<#if shortDateInput?exists && shortDateInput>yyyy-MM-dd<#else>yyyy-MM-dd hh:mm:ss"; newValue = dateObj.toString(ofbizTime); } jQuery("#${id}").val(newValue); @@ -171,7 +171,7 @@ under the License. jQuery("#${id}").datetimepicker({ showSecond: true, <#-- showMillisec: true, --> - timeFormat: 'HH:mm:ss', + timeFormat: 'hh:mm:ss', stepHour: 1, stepMinute: 1, stepSecond: 1, -- 2.0.0 --------------090608090009020202070405--