forked from 0x2620/pandora
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,
|
$editForm,
|
||||||
|
|
||||||
|
$sendButton = Ox.Button({
|
||||||
|
disabled: true,
|
||||||
|
id: 'send',
|
||||||
|
title: 'Send',
|
||||||
|
width: 64
|
||||||
|
})
|
||||||
|
.bindEvent({
|
||||||
|
click: sendMail
|
||||||
|
}),
|
||||||
|
|
||||||
$mailForm = renderMailForm(),
|
$mailForm = renderMailForm(),
|
||||||
|
|
||||||
$content = Ox.SplitPanel({
|
$content = Ox.SplitPanel({
|
||||||
|
@ -685,15 +695,7 @@ pandora.ui.usersDialog = function() {
|
||||||
value: false,
|
value: false,
|
||||||
width: formWidth - 16
|
width: formWidth - 16
|
||||||
}),
|
}),
|
||||||
Ox.Button({
|
$sendButton
|
||||||
disabled: true,
|
|
||||||
id: 'send',
|
|
||||||
title: 'Send',
|
|
||||||
width: 64
|
|
||||||
})
|
|
||||||
.bindEvent({
|
|
||||||
click: sendMail
|
|
||||||
})
|
|
||||||
],
|
],
|
||||||
width: formWidth - 16
|
width: formWidth - 16
|
||||||
})
|
})
|
||||||
|
@ -736,6 +738,7 @@ pandora.ui.usersDialog = function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function sendMail() {
|
function sendMail() {
|
||||||
|
$sendButton.options({title: 'Sending', disabled: true});
|
||||||
pandora.api.mail({
|
pandora.api.mail({
|
||||||
to: getTo(),
|
to: getTo(),
|
||||||
subject: getFormItemById('subject').value(),
|
subject: getFormItemById('subject').value(),
|
||||||
|
@ -778,6 +781,7 @@ pandora.ui.usersDialog = function() {
|
||||||
title: title,
|
title: title,
|
||||||
width: 304
|
width: 304
|
||||||
}).open();
|
}).open();
|
||||||
|
$sendButton.options({title: 'Send', disabled: false});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue