mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-28 05:25:41 +00:00
(js) Catch some exceptions to avoid console errors
This commit is contained in:
1 parent
37074086cf
commit
60bbe26289
5 files changed
+17
-1
No files matched your search
@@ -16,6 +16,7 @@
|
||||
vm.selectedUid = null;
|
||||
vm.userToAdd = '';
|
||||
vm.searchText = '';
|
||||
vm.folderClassName = folderClassName;
|
||||
vm.templateName = templateName;
|
||||
vm.userFilter = userFilter;
|
||||
vm.closeModal = closeModal;
|
||||
@@ -29,6 +30,13 @@
|
||||
vm.confirmation = { showing: false,
|
||||
message: ''};
|
||||
|
||||
function folderClassName() {
|
||||
if (angular.isFunction(folder.getClassName))
|
||||
return folder.getClassName('bg');
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
function templateName(user) {
|
||||
// Check if user is anonymous and if a specific template must be used
|
||||
var isAnonymous = $document[0].getElementById('UIxAnonymousUserRightsEditor') && user.$isAnonymous();
|
||||
|
||||
@@ -172,6 +172,7 @@
|
||||
stateMessage: message
|
||||
}
|
||||
})
|
||||
.catch() // Cancel
|
||||
.finally(function() {
|
||||
vm.messageDialog = null;
|
||||
});
|
||||
|
||||
@@ -55,6 +55,11 @@
|
||||
window.CKEDITOR.addCss('.cke_editable { font-size: ' + data.SOGoMailComposeFontSize + 'px; }');
|
||||
}
|
||||
|
||||
_.forEach(data.AuxiliaryMailAccounts, function (mailAccount) {
|
||||
if (isNaN(parseInt(mailAccount.port)))
|
||||
mailAccount.port = null;
|
||||
});
|
||||
|
||||
// We convert our list of autoReplyEmailAddresses/forwardAddress into a string.
|
||||
// We also convert our date objects into real date, otherwise we'll have strings
|
||||
// or undefined values and the md-datepicker does NOT like this.
|
||||
|
||||
@@ -148,6 +148,8 @@
|
||||
}).then(function() {
|
||||
vm.preferences.defaults.AuxiliaryMailAccounts[index] = account;
|
||||
form.$setDirty();
|
||||
}, function() {
|
||||
// Cancel
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user