mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-18 09:55:25 +00:00
(feat) now properties dialog for addressbooks
Now also possible to set the EAS sync flag for addressbooks
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
vm.importCards = importCards;
|
||||
vm.exportCards = exportCards;
|
||||
vm.showLinks = showLinks;
|
||||
vm.showProperties = showProperties;
|
||||
vm.share = share;
|
||||
vm.subscribeToFolder = subscribeToFolder;
|
||||
|
||||
@@ -222,6 +223,44 @@
|
||||
}
|
||||
}
|
||||
|
||||
function showProperties(addressbook) {
|
||||
$mdDialog.show({
|
||||
templateUrl: addressbook.id + '/properties',
|
||||
controller: PropertiesDialogController,
|
||||
controllerAs: 'properties',
|
||||
clickOutsideToClose: true,
|
||||
escapeToClose: true,
|
||||
locals: {
|
||||
srcAddressBook: addressbook
|
||||
}
|
||||
}).catch(function() {
|
||||
// Do nothing
|
||||
});
|
||||
|
||||
/**
|
||||
* @ngInject
|
||||
*/
|
||||
PropertiesDialogController.$inject = ['$scope', '$mdDialog', 'srcAddressBook'];
|
||||
function PropertiesDialogController($scope, $mdDialog, srcAddressBook) {
|
||||
var vm = this;
|
||||
|
||||
vm.addressbook = new AddressBook(srcAddressBook.$omit());
|
||||
vm.saveProperties = saveProperties;
|
||||
vm.close = close;
|
||||
|
||||
function saveProperties() {
|
||||
vm.addressbook.$save();
|
||||
// Refresh list instance
|
||||
srcAddressBook.init(vm.addressbook.$omit());
|
||||
$mdDialog.hide();
|
||||
}
|
||||
|
||||
function close() {
|
||||
$mdDialog.cancel();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function share(addressbook) {
|
||||
// Fetch list of ACL users
|
||||
addressbook.$acl.$users().then(function() {
|
||||
|
||||
Reference in New Issue
Block a user