You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ad...@apache.org on 2019/01/15 04:58:24 UTC

svn commit: r1851317 - in /ofbiz/ofbiz-framework/branches/release18.12: ./ themes/common-theme/template/macro/HtmlFormMacroLibrary.ftl

Author: adityasharma
Date: Tue Jan 15 04:58:24 2019
New Revision: 1851317

URL: http://svn.apache.org/viewvc?rev=1851317&view=rev
Log:
Applied fix from trunk for revision: 1851315 
===

Improved: Replace Inline js with External js in renderDateFindField macro
(OFBIZ-9850)


Modified:
    ofbiz/ofbiz-framework/branches/release18.12/   (props changed)
    ofbiz/ofbiz-framework/branches/release18.12/themes/common-theme/template/macro/HtmlFormMacroLibrary.ftl

Propchange: ofbiz/ofbiz-framework/branches/release18.12/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jan 15 04:58:24 2019
@@ -10,4 +10,4 @@
 /ofbiz/branches/json-integration-refactoring:1634077-1635900
 /ofbiz/branches/multitenant20100310:921280-927264
 /ofbiz/branches/release13.07:1547657
-/ofbiz/ofbiz-framework/trunk:1850015,1850023,1850530,1850647,1850685,1850694,1850711,1850914,1850918,1850921,1850948,1850953,1851006,1851013,1851068,1851074,1851130,1851158,1851200,1851224,1851247,1851254
+/ofbiz/ofbiz-framework/trunk:1850015,1850023,1850530,1850647,1850685,1850694,1850711,1850914,1850918,1850921,1850948,1850953,1851006,1851013,1851068,1851074,1851130,1851158,1851200,1851224,1851247,1851254,1851315

Modified: ofbiz/ofbiz-framework/branches/release18.12/themes/common-theme/template/macro/HtmlFormMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/branches/release18.12/themes/common-theme/template/macro/HtmlFormMacroLibrary.ftl?rev=1851317&r1=1851316&r2=1851317&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/branches/release18.12/themes/common-theme/template/macro/HtmlFormMacroLibrary.ftl (original)
+++ ofbiz/ofbiz-framework/branches/release18.12/themes/common-theme/template/macro/HtmlFormMacroLibrary.ftl Tue Jan 15 04:58:24 2019
@@ -402,31 +402,20 @@ under the License.
   <#if conditionGroup?has_content>
     <input type="hidden" name="${name}_grp" value="${conditionGroup}"/>
   </#if>
+  <#if dateType != "time">
+    <#local className = className + " date-time-picker"/>
+  </#if>
+  <#local shortDateInput = "date" == dateType/>
   <span class="view-calendar">
-    <input id="${id}_fld0_value" type="text" <@renderClass className alert /><#if name?has_content> name="${name?html}_fld0_value"</#if><#if localizedInputTitle?has_content> title="${localizedInputTitle}"</#if><#if value?has_content> value="${value}"</#if><#if size?has_content> size="${size}"</#if><#if maxlength?has_content> maxlength="${maxlength}"</#if>/><#if tabindex?has_content> tabindex="${tabindex}"</#if><#rt/>
-    <#if dateType != "time">
-      <script type="application/javascript">
-        <#if "date" == dateType>
-          jQuery("#${id}_fld0_value").datepicker({
-        <#else>
-          jQuery("#${id}_fld0_value").datetimepicker({
-            showSecond: true,
-            <#-- showMillisec: true, -->
-            timeFormat: 'HH:mm:ss',
-            stepHour: 1,
-            stepMinute: 5,
-            stepSecond: 10,
-        </#if>
-            showWeek: true,
-            showOn: 'button',
-            buttonImage: '',
-            buttonText: '',
-            buttonImageOnly: false,
-            dateFormat: 'yy-mm-dd'
-          });
-      </script>
-      <#rt/>
-    </#if>
+    <input id="${id}_fld0_value" type="text" <@renderClass className alert />
+        <#if name?has_content> name="${name?html}_fld0_value"</#if>
+        <#if localizedInputTitle?has_content> title="${localizedInputTitle}"</#if>
+        <#if value?has_content> value="${value}"</#if>
+        <#if size?has_content> size="${size}"</#if>
+        <#if maxlength?has_content> maxlength="${maxlength}"</#if>
+        <#if tabindex?has_content> tabindex="${tabindex}"</#if><#rt/>
+         data-shortdate="${shortDateInput?string}"
+    />
     <#if titleStyle?has_content>
       <span class="${titleStyle}"><#rt/>
     </#if>
@@ -440,30 +429,14 @@ under the License.
       </span><#rt/>
     </#if>
     <#rt/>
-    <input id="${id}_fld1_value" type="text" <@renderClass className alert /><#if name?has_content> name="${name}_fld1_value"</#if><#if localizedInputTitle??> title="${localizedInputTitle?html}"</#if><#if value2?has_content> value="${value2}"</#if><#if size?has_content> size="${size}"</#if><#if maxlength?has_content> maxlength="${maxlength}"</#if>/><#rt/>
-    <#if dateType != "time">
-      <script type="application/javascript">
-        <#if "date" == dateType>
-          jQuery("#${id}_fld1_value").datepicker({
-        <#else>
-          jQuery("#${id}_fld1_value").datetimepicker({
-            showSecond: true,
-            <#-- showMillisec: true, -->
-            timeFormat: 'HH:mm:ss',
-            stepHour: 1,
-            stepMinute: 5,
-            stepSecond: 10,
-        </#if>
-            showWeek: true,
-            showOn: 'button',
-            buttonImage: '',
-            buttonText: '',
-            buttonImageOnly: false,
-            dateFormat: 'yy-mm-dd'
-          });
-      </script>
-      <#rt/>
-    </#if>
+    <input id="${id}_fld1_value" type="text" <@renderClass className alert />
+        <#if name?has_content> name="${name}_fld1_value"</#if>
+        <#if localizedInputTitle??> title="${localizedInputTitle?html}"</#if>
+        <#if value2?has_content> value="${value2}"</#if>
+        <#if size?has_content> size="${size}"</#if>
+        <#if maxlength?has_content> maxlength="${maxlength}"</#if>
+         data-shortdate="${shortDateInput?string}"
+    /><#rt/>
     <#if titleStyle?has_content>
       <span class="${titleStyle}"><#rt/>
     </#if>