(js) Fix error handling in mail editor popup
This commit is contained in:
parent
4d271a6d85
commit
8df0896028
1
NEWS
1
NEWS
|
@ -10,6 +10,7 @@ Enhancements
|
||||||
|
|
||||||
Bug fixes
|
Bug fixes
|
||||||
- [core] yearly repeating events are not shown in web calendar (#4237)
|
- [core] yearly repeating events are not shown in web calendar (#4237)
|
||||||
|
- [web] fixed display of error when the mail editor is in a popup
|
||||||
|
|
||||||
3.2.10 (2017-07-05)
|
3.2.10 (2017-07-05)
|
||||||
-------------------
|
-------------------
|
||||||
|
|
|
@ -199,13 +199,12 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function send() {
|
function send() {
|
||||||
var ctrls = $parentControllers();
|
|
||||||
|
|
||||||
vm.sendState = 'sending';
|
vm.sendState = 'sending';
|
||||||
if (vm.autosave)
|
if (vm.autosave)
|
||||||
$timeout.cancel(vm.autosave);
|
$timeout.cancel(vm.autosave);
|
||||||
|
|
||||||
vm.message.$send().then(function(data) {
|
vm.message.$send().then(function(data) {
|
||||||
|
var ctrls = $parentControllers();
|
||||||
vm.sendState = 'sent';
|
vm.sendState = 'sent';
|
||||||
if (ctrls.draftMailboxCtrl) {
|
if (ctrls.draftMailboxCtrl) {
|
||||||
// We're sending a draft from a popup window and the draft mailbox is opened.
|
// We're sending a draft from a popup window and the draft mailbox is opened.
|
||||||
|
@ -231,9 +230,11 @@
|
||||||
// Let the user see the succesfull message before closing the dialog
|
// Let the user see the succesfull message before closing the dialog
|
||||||
$timeout($mdDialog.hide, 1000);
|
$timeout($mdDialog.hide, 1000);
|
||||||
}, function(response) {
|
}, function(response) {
|
||||||
|
$timeout(function() {
|
||||||
vm.sendState = 'error';
|
vm.sendState = 'error';
|
||||||
vm.errorMessage = response.data? response.data.message : response.statusText;
|
vm.errorMessage = response.data? response.data.message : response.statusText;
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function toggleFullscreen() {
|
function toggleFullscreen() {
|
||||||
|
|
Loading…
Reference in a new issue