Webmail: Add forward button to messages

This commit is contained in:
Francis Lachapelle
2015-01-06 12:09:14 -05:00
parent d048d66cb5
commit 8a928b8179
3 changed files with 58 additions and 9 deletions
+13 -3
View File
@@ -124,8 +124,8 @@
}]
}
})
.state('mail.account.mailbox.message.reply', {
url: '/reply',
.state('mail.account.mailbox.message.action', {
url: '/{actionName:(?:reply|replyall|forward)}',
views: {
'mailbox@mail': {
templateUrl: 'editorTemplate', // UI/Templates/MailerUI/UIxMailEditor.wox
@@ -253,11 +253,21 @@
}])
.controller('MessageEditorCtrl', ['$scope', '$rootScope', '$stateParams', '$state', '$q', 'FileUploader', 'stateAccounts', 'stateMessage', '$timeout', '$modal', 'sgFocus', 'sgDialog', 'sgAccount', 'sgMailbox', 'sgAddressBook', function($scope, $rootScope, $stateParams, $state, $q, FileUploader, stateAccounts, stateMessage, $timeout, $modal, focus, Dialog, Account, Mailbox, AddressBook) {
if ($state.current.url == '/reply') {
if ($stateParams.actionName == 'reply') {
stateMessage.$reply().then(function(msgObject) {
$scope.message = msgObject;
});
}
else if ($stateParams.actionName == 'replyall') {
stateMessage.$replyAll().then(function(msgObject) {
$scope.message = msgObject;
});
}
else if ($stateParams.actionName == 'forward') {
stateMessage.$forward().then(function(msgObject) {
$scope.message = msgObject;
});
}
else if (angular.isDefined(stateMessage)) {
$scope.message = stateMessage;
}