Labels in the Cart for addresses are optional. They take the first line of the address if left blank. Tested w and w/o JS.
This commit is contained in:
parent
b8d7466e65
commit
5765739a95
4 changed files with 15 additions and 8 deletions
|
|
@ -38,9 +38,18 @@
|
|||
|
||||
var Cart = {
|
||||
attachAddressBlurHandlers: function (name) {
|
||||
var fields = _.values(this.elements[name]),
|
||||
var els = this.elements[name],
|
||||
label = els.label,
|
||||
addr = els.address1,
|
||||
fields = _.values(els),
|
||||
handler = this.createAddressBlurHandler(name);
|
||||
this.event.on(fields, 'focusout', handler);
|
||||
this.event.on(addr, 'focusout', function () {
|
||||
if (!label.value) {
|
||||
label.value = addr.value;
|
||||
label.blur();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
attachAddressSelectHandler: function (name) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue