mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-07-07 01:15:09 +00:00
Added calendar subscription
This commit is contained in:
committed by
Francis Lachapelle
parent
428f2586c7
commit
36189e4203
@@ -162,6 +162,17 @@
|
||||
</md-item-content>
|
||||
</md-item>
|
||||
</md-list>
|
||||
<md-toolbar class="md-medium-tall">
|
||||
<div class="md-toolbar-tools md-toolbar-tools-bottom">
|
||||
<md-button
|
||||
class="iconButton sg-button-navicon"
|
||||
label:aria-label="Subscribe to a Calendar..."
|
||||
sg-subscribe="calendar"
|
||||
sg-subscribe-on-select="subscribeToFolder(folderData)">
|
||||
<i class="md-icon-folder-shared"><!-- icon --></i>
|
||||
</md-button>
|
||||
</div>
|
||||
</md-toolbar>
|
||||
</md-content>
|
||||
</md-sidenav>
|
||||
|
||||
|
||||
@@ -475,7 +475,7 @@
|
||||
var vm = this;
|
||||
vm.showDialog = function() {
|
||||
$mdDialog.show({
|
||||
templateUrl: 'UIxContactsUserFolders',
|
||||
templateUrl: '../Contacts/UIxContactsUserFolders',
|
||||
clickOutsideToClose: true,
|
||||
locals: {
|
||||
folderType: vm.folderType,
|
||||
|
||||
@@ -105,6 +105,15 @@
|
||||
});
|
||||
}
|
||||
}, true); // compare for object equality
|
||||
/**
|
||||
* subscribeToFolder - Callback of sgSubscribe directive
|
||||
*/
|
||||
$scope.subscribeToFolder = function(calendarData) {
|
||||
console.debug('subscribeToFolder ' + calendarData.owner + calendarData.name);
|
||||
Calendar.$subscribe(calendarData.owner, calendarData.name).catch(function(data) {
|
||||
Dialog.alert(l('Warning'), l('An error occured please try again.'));
|
||||
});
|
||||
};
|
||||
}])
|
||||
|
||||
.controller('CalendarListController', ['$scope', '$rootScope', '$timeout', 'sgFocus', 'encodeUriFilter', 'sgDialog', 'sgSettings', 'sgCalendar', 'sgComponent', function($scope, $rootScope, $timeout, focus, encodeUriFilter, Dialog, Settings, Calendar, Component) {
|
||||
|
||||
Reference in New Issue
Block a user