(feat) first pass at the calendar properties dialog

This commit is contained in:
Ludovic Marcotte
2015-06-15 09:53:10 -04:00
parent e18b61f180
commit b4f9b9095d
5 changed files with 276 additions and 266 deletions
@@ -125,7 +125,7 @@
*/
LinksDialogController.$inject = ['scope', '$mdDialog'];
function LinksDialogController(scope, $mdDialog) {
scope.close = function(type) {
scope.close = function() {
$mdDialog.hide();
}
}
@@ -17,6 +17,7 @@
vm.confirmDelete = confirmDelete;
vm.share = share;
vm.showLinks = showLinks;
vm.showProperties = showProperties;
vm.subscribeToFolder = subscribeToFolder;
// Dispatch the event named 'calendars:list' when a calendar is activated or deactivated or
@@ -108,9 +109,39 @@
*/
LinksDialogController.$inject = ['scope', '$mdDialog'];
function LinksDialogController(scope, $mdDialog) {
scope.close = function(type) {
scope.close = function() {
$mdDialog.hide();
};
}
}
function showProperties(calendar) {
$mdDialog.show({
templateUrl: calendar.id + '/properties',
controller: PropertiesDialogController,
controllerAs: 'properties',
clickOutsideToClose: true,
escapeToClose: true,
locals: {
calendar: calendar
}
});
/**
* @ngInject
*/
PropertiesDialogController.$inject = ['$mdDialog', 'calendar'];
function PropertiesDialogController($mdDialog, calendar) {
var vm = this;
vm.calendar = calendar;
vm.close = function() {
$mdDialog.hide();
};
vm.saveProperties = function() {
vm.calendar.$save();
};
}
}