(feat) allow showing links to address books

This commit is contained in:
Ludovic Marcotte
2015-06-12 11:21:02 -04:00
committed by Francis Lachapelle
parent 942c972942
commit a89b116940
8 changed files with 83 additions and 80 deletions

View File

@@ -20,6 +20,7 @@
vm.confirmDelete = confirmDelete;
vm.importCards = importCards;
vm.exportCards = exportCards;
vm.showLinks = showLinks;
vm.share = share;
vm.subscribeToFolder = subscribeToFolder;
@@ -108,6 +109,28 @@
window.location.href = ApplicationBaseURL + '/' + vm.service.selectedFolder.id + '/exportFolder';
}
function showLinks(selectedFolder) {
$mdDialog.show({
parent: angular.element(document.body),
clickOutsideToClose: true,
escapeToClose: true,
templateUrl: selectedFolder.id + '/links',
locals: {
},
controller: LinksDialogController
});
/**
* @ngInject
*/
LinksDialogController.$inject = ['scope', '$mdDialog'];
function LinksDialogController(scope, $mdDialog) {
scope.close = function(type) {
$mdDialog.hide();
}
}
}
function share(addressbook) {
if (addressbook.id != vm.service.selectedFolder.id) {
// Counter the possibility to click on the "hidden" secondary button