(feat) handle links to addressbooks like we do for calendars

also included missing template commit for calendar
This commit is contained in:
Ludovic Marcotte
2015-08-17 16:21:10 -04:00
parent 7b5541b5d1
commit 20bf66d931
8 changed files with 127 additions and 115 deletions

View File

@@ -109,25 +109,31 @@
window.location.href = ApplicationBaseURL + '/' + vm.service.selectedFolder.id + '/exportFolder';
}
function showLinks(selectedFolder) {
function showLinks(addressbook) {
$mdDialog.show({
parent: angular.element(document.body),
clickOutsideToClose: true,
escapeToClose: true,
templateUrl: selectedFolder.id + '/links',
templateUrl: addressbook.id + '/links',
controller: LinksDialogController,
controllerAs: 'links',
locals: {
},
controller: LinksDialogController
addressbook: addressbook
}
});
/**
* @ngInject
*/
LinksDialogController.$inject = ['scope', '$mdDialog'];
function LinksDialogController(scope, $mdDialog) {
scope.close = function() {
LinksDialogController.$inject = ['$mdDialog', 'addressbook'];
function LinksDialogController($mdDialog, addressbook) {
var vm = this;
this.addressbook = addressbook;
this.close = close;
function close() {
$mdDialog.hide();
};
}
}
}