svn commit: r942059 - /ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/images/checkoutProcess.js

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

svn commit: r942059 - /ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/images/checkoutProcess.js

mor-2
Author: mor
Date: Fri May  7 12:38:07 2010
New Revision: 942059

URL: http://svn.apache.org/viewvc?rev=942059&view=rev
Log:
Minor improvements:
Used prototype utility method to return all the anchor elements inside a form with id="cartForm"
Removed an unnecessary variable declaration

Modified:
    ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/images/checkoutProcess.js

Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/images/checkoutProcess.js
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/images/checkoutProcess.js?rev=942059&r1=942058&r2=942059&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/images/checkoutProcess.js (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/images/checkoutProcess.js Fri May  7 12:38:07 2010
@@ -393,11 +393,9 @@ function initCartProcessObservers() {
             Event.observe(e, 'change', cartItemQtyChanged);
         }
     });
-    var removeLinks = cartForm.getElementsByTagName('a');
-    var links = $A(removeLinks);
+    var links = $$('form#cartForm a');
     links.each( function(e) {
-        var removeLink = e.id;
-        if (removeLink.startsWith('removeItemLink_')) {
+        if ((e.id).startsWith('removeItemLink_')) {
             Event.observe(e, 'click', removeItem);
         }
     });