mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-07-15 21:34:53 +00:00
(feat) show all/only this calendar
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user