disable send button during send, fixes #694
This commit is contained in:
parent
c1d9640369
commit
eb58676dd6
1 changed files with 13 additions and 9 deletions
|
@ -323,6 +323,16 @@ pandora.ui.usersDialog = function() {
|
|||
|
||||
$editForm,
|
||||
|
||||
$sendButton = Ox.Button({
|
||||
disabled: true,
|
||||
id: 'send',
|
||||
title: 'Send',
|
||||
width: 64
|
||||
})
|
||||
.bindEvent({
|
||||
click: sendMail
|
||||
}),
|
||||
|
||||
$mailForm = renderMailForm(),
|
||||
|
||||
$content = Ox.SplitPanel({
|
||||
|
@ -685,15 +695,7 @@ pandora.ui.usersDialog = function() {
|
|||
value: false,
|
||||
width: formWidth - 16
|
||||
}),
|
||||
Ox.Button({
|
||||
disabled: true,
|
||||
id: 'send',
|
||||
title: 'Send',
|
||||
width: 64
|
||||
})
|
||||
.bindEvent({
|
||||
click: sendMail
|
||||
})
|
||||
$sendButton
|
||||
],
|
||||
width: formWidth - 16
|
||||
})
|
||||
|
@ -736,6 +738,7 @@ pandora.ui.usersDialog = function() {
|
|||
}
|
||||
|
||||
function sendMail() {
|
||||
$sendButton.options({title: 'Sending', disabled: true});
|
||||
pandora.api.mail({
|
||||
to: getTo(),
|
||||
subject: getFormItemById('subject').value(),
|
||||
|
@ -778,6 +781,7 @@ pandora.ui.usersDialog = function() {
|
|||
title: title,
|
||||
width: 304
|
||||
}).open();
|
||||
$sendButton.options({title: 'Send', disabled: false});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue