(js,html) Improve IMAP subscriptions manager

This commit is contained in:
Francis Lachapelle
2016-09-30 12:02:46 -04:00
parent f233b2a9a7
commit 268b8ea1c3
4 changed files with 34 additions and 22 deletions
@@ -187,7 +187,7 @@
clickOutsideToClose: true,
escapeToClose: true,
locals: {
srcApp: vm,
metadataForFolder: metadataForFolder,
srcAccount: account
}
}).finally(function() {
@@ -197,16 +197,25 @@
/**
* @ngInject
*/
SubscriptionsDialogController.$inject = ['$scope', '$mdDialog', 'srcApp', 'srcAccount'];
function SubscriptionsDialogController($scope, $mdDialog, srcApp, srcAccount) {
SubscriptionsDialogController.$inject = ['$scope', '$mdDialog', 'metadataForFolder', 'srcAccount'];
function SubscriptionsDialogController($scope, $mdDialog, metadataForFolder, srcAccount) {
var vm = this;
vm.app = srcApp;
vm.account = new Account({id: srcAccount.id,
name: srcAccount.name},
true);
vm.loading = true;
vm.filter = { name: '' };
vm.metadataForFolder = metadataForFolder;
vm.account = new Account({
id: srcAccount.id,
name: srcAccount.name
});
vm.close = close;
vm.account.$getMailboxes().then(function() {
vm.loading = false;
});
function close() {
$mdDialog.cancel();
}