Handle the edition of recurring event occurrences

This commit is contained in:
Francis Lachapelle
2015-07-27 16:02:05 -04:00
parent 049c1385d6
commit 86a0032cc1
9 changed files with 66 additions and 16 deletions
@@ -13,10 +13,11 @@
vm.component = stateComponent;
vm.close = close;
vm.edit = edit;
vm.editAllOccurrences = editAllOccurrences;
// Load all attributes of component
if (angular.isUndefined(vm.component.$futureComponentData)) {
component = Calendar.$get(vm.component.c_folder).$getComponent(vm.component.c_name);
component = Calendar.$get(vm.component.c_folder).$getComponent(vm.component.c_name, vm.component.c_recurrence_id);
component.$futureComponentData.then(function() {
vm.component = component;
});
@@ -26,6 +27,14 @@
$mdDialog.hide();
}
function editAllOccurrences() {
component = Calendar.$get(vm.component.pid).$getComponent(vm.component.id);
component.$futureComponentData.then(function() {
vm.component = component;
edit();
});
}
function edit() {
var type = (vm.component.component == 'vevent')? 'Appointment':'Task';
$mdDialog.hide().then(function() {