forked from verdnatura/hedera-web
43 lines
679 B
JavaScript
43 lines
679 B
JavaScript
|
|
Hedera.AddressList = new Class
|
|
({
|
|
Extends: Hedera.Form
|
|
|
|
,activate: function ()
|
|
{
|
|
this.$('user-model').setInfo ('c', 'myClient', 'hedera');
|
|
this.$('addresses').setInfo ('a', 'myAddress', 'hedera');
|
|
}
|
|
|
|
,onAddAddressClick: function ()
|
|
{
|
|
this.hash.set ({
|
|
form: 'account/address',
|
|
address: 0
|
|
});
|
|
}
|
|
|
|
,onReturnClick: function ()
|
|
{
|
|
window.history.back();
|
|
}
|
|
|
|
,onRemoveAddressClick: function (button, form)
|
|
{
|
|
if (confirm (_('AreYouSureDeleteAddress')))
|
|
{
|
|
form.set ('active', false);
|
|
form.refresh ();
|
|
}
|
|
}
|
|
|
|
,onEditAddressClick: function (button, form)
|
|
{
|
|
this.hash.set ({
|
|
form: 'account/address',
|
|
address: form.get ('id')
|
|
});
|
|
}
|
|
});
|
|
|