Add cancel button to Webmail editor

This commit is contained in:
Francis Lachapelle
2015-03-20 11:16:24 -04:00
parent 56763e1aca
commit 4f6babcdcc
3 changed files with 10 additions and 4 deletions
@@ -632,7 +632,7 @@
return function postLink(scope, iElement, iAttr, controller) {
$compile(mdInputEl)(scope);
$compile(selectEl)(scope);
$compile(tElement.find('md-button'))(scope);
$compile(tElement.find('md-button'))(scope.$parent);
}
}
}])
+6
View File
@@ -277,6 +277,12 @@
$scope.message = stateMessage;
}
$scope.identities = _.pluck(_.flatten(_.pluck(stateAccounts, 'identities')), 'full');
$scope.cancel = function() {
if ($scope.mailbox)
$state.go('mail.account.mailbox', { accountId: $scope.mailbox.$account.id, mailboxId: $scope.mailbox.id });
else
$state.go('mail');
};
$scope.send = function(message) {
message.$send().then(function(data) {
$rootScope.message = null;