(feat) show all/only this calendar

This commit is contained in:
Ludovic Marcotte
2016-02-10 13:47:17 -05:00
parent 37f4b11834
commit 6876ba8709
4 changed files with 34 additions and 0 deletions
@@ -21,6 +21,8 @@
vm.share = share;
vm.importCalendar = importCalendar;
vm.exportCalendar = exportCalendar;
vm.showOnly = showOnly;
vm.showAll = showAll;
vm.showLinks = showLinks;
vm.showProperties = showProperties;
vm.subscribeToFolder = subscribeToFolder;
@@ -202,6 +204,19 @@
window.location.href = ApplicationBaseURL + '/' + calendar.id + '.ics' + '/export';
}
function showOnly(calendar) {
_.forEach(Calendar.$findAll(), function(o) {
if (calendar.id == o.id)
o.active = 1;
else
o.active = 0;
});
}
function showAll() {
_.forEach(Calendar.$findAll(), function(o) { o.active = 1; });
}
function showLinks(calendar) {
$mdDialog.show({
parent: angular.element(document.body),