svn commit: r1857120 - in /ofbiz/ofbiz-plugins/trunk/ecommerce: template/catalog/ProductDetail.ftl webapp/ecommerce/css/custom.css

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1857120 - in /ofbiz/ofbiz-plugins/trunk/ecommerce: template/catalog/ProductDetail.ftl webapp/ecommerce/css/custom.css

Deepak Dixit-5
Author: deepak
Date: Mon Apr  8 16:51:32 2019
New Revision: 1857120

URL: http://svn.apache.org/viewvc?rev=1857120&view=rev
Log:
Improved: Amount field is editable at Product Detail Page
(OFBIZ-10663)
Added mising css and js code to show/hide the amount field based on Product.requireAmount field.
Thanks  Dikpal Kanungo for reporting the issue.

Modified:
    ofbiz/ofbiz-plugins/trunk/ecommerce/template/catalog/ProductDetail.ftl
    ofbiz/ofbiz-plugins/trunk/ecommerce/webapp/ecommerce/css/custom.css

Modified: ofbiz/ofbiz-plugins/trunk/ecommerce/template/catalog/ProductDetail.ftl
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ecommerce/template/catalog/ProductDetail.ftl?rev=1857120&r1=1857119&r2=1857120&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/ecommerce/template/catalog/ProductDetail.ftl (original)
+++ ofbiz/ofbiz-plugins/trunk/ecommerce/template/catalog/ProductDetail.ftl Mon Apr  8 16:51:32 2019
@@ -124,10 +124,12 @@ ${virtualVariantJavaScript!}
     function toggleAmt(toggle) {
         if (toggle == 'Y') {
             changeObjectVisibility("add_amount", "visible");
+            document.getElementById("add_amount").style.height = "auto";
         }
 
         if (toggle == 'N') {
             changeObjectVisibility("add_amount", "hidden");
+            document.getElementById("add_amount").style.height = "0px";
         }
     }
 
@@ -669,7 +671,6 @@ $(function(){
         </#if>
         <#-- Variant Selection -->
         <div class="form-group">
-        <label>${uiLabelMap.CommonAmount}:</label>
         <#if "Y" == product.isVirtual!?upper_case>
           <#if "VV_FEATURETREE" == product.virtualVariantMethodEnum! && featureLists?has_content>
             <#list featureLists as featureList>
@@ -769,6 +770,7 @@ $(function(){
               <#assign hiddenStyle = "hidden"/>
             </#if>
             <div id="add_amount" class="${hiddenStyle} form-group">
+              <label>${uiLabelMap.CommonAmount}:</label>
               <input type="text" class="form-control" name="add_amount" value=""/>
             </div>
             <#if "ASSET_USAGE" == product.productTypeId! || "ASSET_USAGE_OUT_IN" == product.productTypeId!>

Modified: ofbiz/ofbiz-plugins/trunk/ecommerce/webapp/ecommerce/css/custom.css
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ecommerce/webapp/ecommerce/css/custom.css?rev=1857120&r1=1857119&r2=1857120&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/ecommerce/webapp/ecommerce/css/custom.css (original)
+++ ofbiz/ofbiz-plugins/trunk/ecommerce/webapp/ecommerce/css/custom.css Mon Apr  8 16:51:32 2019
@@ -113,4 +113,9 @@ label.required:after {
 }
 button.jGrowl-close {
     float: right;
+}
+
+.hidden {
+    height: 0;
+    visibility: hidden;
 }
\ No newline at end of file