1 (function(angular
, $, _
) {
4 angular
.module('crmSearchActions').controller('crmSearchActionDelete', function($scope
, crmApi4
, dialogService
, searchMeta
) {
5 var ts
= $scope
.ts
= CRM
.ts(),
7 ctrl
= $scope
.$ctrl
= this;
9 this.entity
= searchMeta
.getEntity(model
.entity
);
10 this.entityTitle
= model
.ids
.length
=== 1 ? this.entity
.title
: this.entity
.titlePlural
;
12 this.cancel = function() {
13 dialogService
.cancel('crmSearchAction');
16 this.delete = function() {
17 crmApi4(model
.entity
, 'Delete', {
18 where
: [['id', 'IN', model
.ids
]],
20 dialogService
.close('crmSearchAction');
25 })(angular
, CRM
.$, CRM
._
);