projects
/
Portfolio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8e1a01f
)
jslint
author
Benoît Pin
<pin@cri.ensmp.fr>
Fri, 10 Oct 2014 11:00:26 +0000
(13:00 +0200)
committer
Benoît Pin
<pin@cri.ensmp.fr>
Fri, 10 Oct 2014 11:00:26 +0000
(13:00 +0200)
skins/cart_listing.js
patch
|
blob
|
history
diff --git
a/skins/cart_listing.js
b/skins/cart_listing.js
index
593002a
..
cf160c3
100644
(file)
--- a/
skins/cart_listing.js
+++ b/
skins/cart_listing.js
@@
-9,39
+9,39
@@
var CartListing;
(function(){
var ENTERKEY = 13;
(function(){
var ENTERKEY = 13;
-CartListing = function(table)
{
+CartListing = function(table)
{
var thisCL = this;
this.table = table;
var form = table.parentNode;
var thisCL = this;
this.table = table;
var form = table.parentNode;
- while(form.tagName !=
'FORM')
- form = form.parentNode;
+ while(form.tagName !=
= 'FORM') {
+ form = form.parentNode;
}
this.fm = new FormManager(form);
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);});
+ 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);});
addListener(table, 'keypress', function(evt){thisCL.onKeypress(evt);});
-}
+}
;
CartListing.prototype.updateRow = function(evt) {
var target = getTargetedObject(evt);
CartListing.prototype.updateRow = function(evt) {
var target = getTargetedObject(evt);
- if (target.tagName !=
'INPUT')
- return;
+ if (target.tagName !=
= 'INPUT'){
+ return;
}
var row = target.parentNode.parentNode;
var row = target.parentNode.parentNode;
- var inputs = row.getElementsByTagName('input')
+ var inputs = row.getElementsByTagName('input')
;
var refreshBtn = inputs[1];
this.fm.submitButton = refreshBtn;
this.fm.submit(evt);
};
CartListing.prototype.onKeypress = function(evt){
var refreshBtn = inputs[1];
this.fm.submitButton = refreshBtn;
this.fm.submit(evt);
};
CartListing.prototype.onKeypress = function(evt){
- if (evt.keyCode ==
ENTERKEY)
- this.updateRow(evt);
+ if (evt.keyCode ==
= ENTERKEY){
+ this.updateRow(evt);
}
};
};
-})();
\ No newline at end of file
+}());