svn commit: r495898 - /ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productdetail.ftl

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

svn commit: r495898 - /ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productdetail.ftl

jleroux@apache.org
Author: jleroux
Date: Sat Jan 13 06:12:54 2007
New Revision: 495898

URL: http://svn.apache.org/viewvc?view=rev&rev=495898
Log:
A refactored patch from Jonathon Wong "<<Add to cart" button still active even though last feature is not selected>> (https://issues.apache.org/jira/browse/OFBIZ-621)

Modified:
    ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productdetail.ftl

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productdetail.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productdetail.ftl?view=diff&rev=495898&r1=495897&r2=495898
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productdetail.ftl (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productdetail.ftl Sat Jan 13 06:12:54 2007
@@ -26,10 +26,16 @@
     function setAddProductId(name) {
         document.addform.add_product_id.value = name;
         if (document.addform.quantity == null) return;
-        if (name == 'NULL' || isVirtual(name) == true) {
+        if (name == '' || name == 'NULL' || isVirtual(name) == true) {
             document.addform.quantity.disabled = true;
+            var elem = document.getElementById('product_id_display');
+            var txt = document.createTextNode('');
+            elem.replaceChild(txt, elem.firstChild);
         } else {
             document.addform.quantity.disabled = false;
+            var elem = document.getElementById('product_id_display');
+            var txt = document.createTextNode(name);
+            elem.replaceChild(txt, elem.firstChild);
         }
     }
     function isVirtual(product) {
@@ -361,6 +367,9 @@
             </#list>
             <input type="hidden" name="product_id" value="${product.productId}"/>
             <input type="hidden" name="add_product_id" value="NULL"/>
+            <div class="tabletext">
+                <b><span id="product_id_display"> </span></b>
+            </div>
           <#else>
             <input type="hidden" name="product_id" value="${product.productId}"/>
             <input type="hidden" name="add_product_id" value="NULL"/>