mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-27 19:19:21 +03:00
SMTP errors for client side (labs.smtp_show_server_errors)
This commit is contained in:
parent
9334187954
commit
2c1087b987
11 changed files with 88 additions and 43 deletions
|
|
@ -59,19 +59,6 @@ function PopupsComposeViewModel()
|
|||
this.saving = ko.observable(false);
|
||||
this.attachments = ko.observableArray([]);
|
||||
|
||||
// this.attachmentsInProcess = ko.computed(function () {
|
||||
// return _.filter(this.attachments(), function (oItem) {
|
||||
// return oItem && '' === oItem.tempName();
|
||||
// });
|
||||
// }, this);
|
||||
//
|
||||
// this.attachmentsInReady = ko.computed(function () {
|
||||
// return _.filter(this.attachments(), function (oItem) {
|
||||
// return oItem && '' !== oItem.tempName();
|
||||
// });
|
||||
// }, this);
|
||||
|
||||
|
||||
this.attachmentsInProcess = this.attachments.filter(function (oItem) {
|
||||
return oItem && '' === oItem.tempName();
|
||||
});
|
||||
|
|
@ -486,7 +473,10 @@ PopupsComposeViewModel.prototype.formattedFrom = function (bHeaderResult)
|
|||
|
||||
PopupsComposeViewModel.prototype.sendMessageResponse = function (sResult, oData)
|
||||
{
|
||||
var bResult = false;
|
||||
var
|
||||
bResult = false,
|
||||
sMessage = ''
|
||||
;
|
||||
|
||||
this.sending(false);
|
||||
|
||||
|
|
@ -508,8 +498,11 @@ PopupsComposeViewModel.prototype.sendMessageResponse = function (sResult, oData)
|
|||
}
|
||||
else
|
||||
{
|
||||
sMessage = Utils.getNotification(oData && oData.ErrorCode ? oData.ErrorCode : Enums.Notification.CantSendMessage,
|
||||
oData && oData.ErrorMessage ? oData.ErrorMessage : '');
|
||||
|
||||
this.sendError(true);
|
||||
window.alert(Utils.getNotification(oData && oData.ErrorCode ? oData.ErrorCode : Enums.Notification.CantSendMessage));
|
||||
window.alert(sMessage || Utils.getNotification(Enums.Notification.CantSendMessage));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue