(js) Fix batch delete of components

Fixes #3516
This commit is contained in:
Francis Lachapelle committed 2016-02-11 09:33:58 -05:00
1 parent f70c0fa6e6
commit 9cc4bfd9be
3 files changed
+14 -15

No files matched your search

@@ -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');
});
});
}