(js) Create new message when opening a mailto link

Fixes #3588
This commit is contained in:
Francis Lachapelle
2016-05-10 21:29:18 -04:00
parent 42bdfbcf7b
commit 68381b31d8
4 changed files with 53 additions and 20 deletions
@@ -6,8 +6,8 @@
/**
* @ngInject
*/
MessageEditorController.$inject = ['$window', '$stateParams', '$mdConstant', '$mdDialog', '$mdToast', 'FileUploader', 'stateAccount', 'stateMessage', 'stateRecipients', 'encodeUriFilter', '$timeout', 'Dialog', 'AddressBook', 'Card', 'Preferences'];
function MessageEditorController($window, $stateParams, $mdConstant, $mdDialog, $mdToast, FileUploader, stateAccount, stateMessage, stateRecipients, encodeUriFilter, $timeout, Dialog, AddressBook, Card, Preferences) {
MessageEditorController.$inject = ['$window', '$stateParams', '$mdConstant', '$mdDialog', '$mdToast', 'FileUploader', 'stateAccount', 'stateMessage', 'encodeUriFilter', '$timeout', 'Dialog', 'AddressBook', 'Card', 'Preferences'];
function MessageEditorController($window, $stateParams, $mdConstant, $mdDialog, $mdToast, FileUploader, stateAccount, stateMessage, encodeUriFilter, $timeout, Dialog, AddressBook, Card, Preferences) {
var vm = this, semicolon = 186;
vm.addRecipient = addRecipient;
@@ -79,10 +79,6 @@
addAttachments();
}
if (angular.isDefined(stateRecipients)) {
vm.message.editable.to = _.union(vm.message.editable.to, _.map(stateRecipients, 'full'));
}
/**
* If this is a popup window, retrieve the mailbox controller of the parent window.
*/