(js) Fix batch delete of components

Fixes #3516
This commit is contained in:
Francis Lachapelle
2016-02-11 09:33:58 -05:00
parent f70c0fa6e6
commit 9cc4bfd9be
3 changed files with 14 additions and 15 deletions
@@ -80,8 +80,12 @@
{ ok: l('Delete') })
.then(function() {
// User confirmed the deletion
var components = _.filter(Component['$' + vm.componentType], function(component) { return component.selected; });
Calendar.$deleteComponents(components);
var components = _.filter(Component['$' + vm.componentType], function(component) {
return component.selected;
});
Calendar.$deleteComponents(components).then(function() {
$rootScope.$emit('calendars:list');
});
});
}