Fix handling of recipient addresses in mail editor

This commit is contained in:
Francis Lachapelle
2014-12-11 21:52:46 -05:00
parent 761ca0f983
commit c2c15e4968
4 changed files with 58 additions and 10 deletions
+2 -2
View File
@@ -229,7 +229,7 @@
};
}])
.controller('MessageEditorCtrl', ['$scope', '$rootScope', '$stateParams', 'stateAccounts', 'stateMessage', '$timeout', '$modal', 'sgFocus', 'sgDialog', 'sgAccount', 'sgMailbox', function($scope, $rootScope, $stateParams, stateAccounts, stateMessage, $timeout, $modal, focus, Dialog, Account, Mailbox) {
.controller('MessageEditorCtrl', ['$scope', '$rootScope', '$stateParams', '$state', 'stateAccounts', 'stateMessage', '$timeout', '$modal', 'sgFocus', 'sgDialog', 'sgAccount', 'sgMailbox', function($scope, $rootScope, $stateParams, $state, stateAccounts, stateMessage, $timeout, $modal, focus, Dialog, Account, Mailbox) {
if (angular.isDefined(stateMessage)) {
$scope.message = stateMessage;
}
@@ -237,7 +237,7 @@
$scope.send = function(message) {
message.$send().then(function(data) {
$rootScope.message = null;
$state.go('mail.account.mailbox', { accountId: stateAccount.id, mailboxId: encodeUriFilter(stateMailbox.path) });
$state.go('mail');
}, function(data) {
console.debug('failure ' + JSON.stringify(data, undefined, 2));
});