(js) Delete an event or a task

This commit is contained in:
Francis Lachapelle
2015-09-28 11:27:20 -04:00
parent 5496dd97d9
commit b27cfc2bd8
4 changed files with 102 additions and 19 deletions

View File

@@ -17,6 +17,8 @@
vm.editAllOccurrences = editAllOccurrences;
vm.reply = reply;
vm.replyAllOccurrences = replyAllOccurrences;
vm.deleteOccurrence = deleteOccurrence;
vm.deleteAllOccurrences = deleteAllOccurrences;
// Load all attributes of component
if (angular.isUndefined(vm.component.$futureComponentData)) {
@@ -88,7 +90,21 @@
reply(component);
});
}
}
function deleteOccurrence() {
vm.component.remove(true).then(function() {
$rootScope.$broadcast('calendars:list');
$mdDialog.hide();
});
}
function deleteAllOccurrences() {
vm.component.remove().then(function() {
$rootScope.$broadcast('calendars:list');
$mdDialog.hide();
});
}
}
/**
* @ngInject