Improve Mail module

- JSONinfied mail folder create and delete actions
- restored sgFolderTree directive
- extended folder types with "shared" and "otherUsers"
- added mailbox creation at the account level
This commit is contained in:
Francis Lachapelle
2014-12-18 15:22:29 -05:00
parent 7237052526
commit 494a809276
8 changed files with 137 additions and 74 deletions
+9
View File
@@ -179,6 +179,15 @@
.controller('MailboxesCtrl', ['$scope', '$rootScope', '$stateParams', '$state', '$timeout', '$modal', 'sgFocus', 'encodeUriFilter', 'sgDialog', 'sgAccount', 'sgMailbox', 'stateAccounts', function($scope, $rootScope, $stateParams, $state, $timeout, $modal, focus, encodeUriFilter, Dialog, Account, Mailbox, stateAccounts) {
$scope.accounts = stateAccounts;
$scope.newFolder = function(parentFolder) {
Dialog.prompt(l('New folder'),
l('Enter the new name of your folder :'))
.then(function(name) {
if (name && name.length > 0) {
parentFolder.$newMailbox(parentFolder.id, name);
}
});
};
$scope.setCurrentFolder = function(account, folder) {
$rootScope.currentFolder = folder;
$state.go('mail.account.mailbox', { accountId: account.id, mailboxId: encodeUriFilter(folder.path) });