X-Git-Url: https://scm.cri.minesparis.psl.eu/git/Portfolio.git/blobdiff_plain/8a59623d303386b587ea30f8170cd0c66ec5d196..e73353500c67453ef9663d67eaeee7dd46c358ee:/skins/cart_listing.js?ds=inline diff --git a/skins/cart_listing.js b/skins/cart_listing.js deleted file mode 100644 index c6363b0..0000000 --- a/skins/cart_listing.js +++ /dev/null @@ -1,50 +0,0 @@ -/* -* © 2009 Luxia SAS. All rights reserved. -* Contributors -* — Benoît Pin -* -* -* -*/ - -var CartListing; - -(function(){ -var ENTERKEY = 13; - -CartListing = function(table) { - var thisCL = this; - this.table = table; - var form = table.parentNode; - while(form.tagName != 'FORM') - form = form.parentNode; - - this.fm = new FormManager(form); - - if (browser.isIE) - addListener(table, 'focusout', function(evt){thisCL.updateRow(evt);}); - else - addListener(table, 'change', function(evt){thisCL.updateRow(evt);}); - - addListener(table, 'keypress', function(evt){thisCL.onKeypress(evt);}); -} - -CartListing.prototype.updateRow = function(evt) { - var target = getTargetedObject(evt); - if (target.tagName != 'INPUT') - return; - - - var row = target.parentNode.parentNode; - var inputs = row.getElementsByTagName('input') - var refreshBtn = inputs[1]; - this.fm.submitButton = refreshBtn; - this.fm.submit(evt); -}; - -CartListing.prototype.onKeypress = function(evt){ - if (evt.keyCode == ENTERKEY) - this.updateRow(evt); -}; - -})(); \ No newline at end of file