2 * © 2009 Luxia SAS. All rights reserved.
4 * — Benoît Pin <pinbe@luxia.fr>
6 * $Id: cart_listing.js 1009 2009-05-17 15:18:05Z pin $
7 * $URL: http://svn.luxia.fr/svn/labo/projects/zope/Portfolio/trunk/skins/cart_listing.js $
15 CartListing = function(table
) {
18 var form
= table
.parentNode
;
19 while(form
.tagName
!= 'FORM')
20 form
= form
.parentNode
;
22 this.fm
= new FormManager(form
);
25 addListener(table
, 'focusout', function(evt
){thisCL
.updateRow(evt
);});
27 addListener(table
, 'change', function(evt
){thisCL
.updateRow(evt
);});
29 addListener(table
, 'keypress', function(evt
){thisCL
.onKeypress(evt
);});
32 CartListing
.prototype.updateRow = function(evt
) {
33 var target
= getTargetedObject(evt
);
34 if (target
.tagName
!= 'INPUT')
38 var row
= target
.parentNode
.parentNode
;
39 var inputs
= row
.getElementsByTagName('input')
40 var refreshBtn
= inputs
[1];
41 this.fm
.submitButton
= refreshBtn
;
45 CartListing
.prototype.onKeypress = function(evt
){
46 if (evt
.keyCode
== ENTERKEY
)