Commit | Line | Data |
---|---|---|
f263929f CW |
1 | (function(angular, $, _) { |
2 | ||
3 | angular.module('crmDashboard').component('crmInactiveDashlet', { | |
4 | bindings: { | |
5 | dashlet: '<', | |
6 | delete: '&' | |
7 | }, | |
8 | templateUrl: '~/crmDashboard/InactiveDashlet.html', | |
9 | controller: function ($scope, $element) { | |
10 | var ts = $scope.ts = CRM.ts(), | |
11 | ctrl = this; | |
12 | ctrl.isAdmin = CRM.checkPerm('administer CiviCRM'); | |
13 | ||
14 | this.$onInit = function() { | |
15 | ctrl.confirmParams = { | |
16 | type: 'delete', | |
17 | obj: ctrl.dashlet, | |
18 | width: 400, | |
19 | message: ts('Do you want to remove this dashlet as an "Available Dashlet", AND delete it from all user dashboards?') | |
20 | }; | |
21 | }; | |
22 | } | |
23 | }); | |
24 | ||
25 | })(angular, CRM.$, CRM._); |