(fix) DI annotation of sgIMAP controller
This commit is contained in:
parent
d7aae0e667
commit
433983e7c4
|
@ -7,7 +7,6 @@
|
|||
/**
|
||||
* sgIMIP - A directive to handle IMIP actions on emails
|
||||
* @memberof SOGo.MailerUI
|
||||
* @ngInject
|
||||
* @example:
|
||||
|
||||
*/
|
||||
|
@ -15,40 +14,46 @@
|
|||
return {
|
||||
restrict: 'A',
|
||||
link: link,
|
||||
controller: controller
|
||||
controller: 'sgImipController'
|
||||
};
|
||||
|
||||
function link(scope, iElement, attrs, ctrl) {
|
||||
ctrl.pathToAttachment = attrs.sgImipPath;
|
||||
}
|
||||
}
|
||||
|
||||
controller.$inject = ['$scope', 'User'];
|
||||
function controller($scope, User) {
|
||||
var vm = this;
|
||||
/**
|
||||
* @ngInject
|
||||
*/
|
||||
sgImipController.$inject = ['$scope', 'User'];
|
||||
function sgImipController($scope, User) {
|
||||
var vm = this;
|
||||
|
||||
$scope.delegateInvitation = false;
|
||||
$scope.delegatedTo = '';
|
||||
$scope.searchText = '';
|
||||
$scope.delegateInvitation = false;
|
||||
$scope.delegatedTo = '';
|
||||
$scope.searchText = '';
|
||||
|
||||
$scope.userFilter = function($query) {
|
||||
return User.$filter($query);
|
||||
};
|
||||
$scope.userFilter = function($query) {
|
||||
return User.$filter($query);
|
||||
};
|
||||
|
||||
$scope.iCalendarAction = function(action) {
|
||||
var data;
|
||||
$scope.iCalendarAction = function(action) {
|
||||
var data;
|
||||
|
||||
if (action == 'delegate') {
|
||||
data = {receiveUpdates: false,
|
||||
delegatedTo: $scope.delegatedTo.c_email};
|
||||
}
|
||||
if (action == 'delegate') {
|
||||
data = {
|
||||
receiveUpdates: false,
|
||||
delegatedTo: $scope.delegatedTo.c_email
|
||||
};
|
||||
}
|
||||
|
||||
$scope.message.$imipAction(vm.pathToAttachment, action, data);
|
||||
};
|
||||
}
|
||||
$scope.message.$imipAction(vm.pathToAttachment, action, data);
|
||||
};
|
||||
}
|
||||
|
||||
angular
|
||||
.module('SOGo.MailerUI')
|
||||
.controller('sgImipController', sgImipController)
|
||||
.directive('sgImip', sgImip);
|
||||
})();
|
||||
|
||||
|
|
Loading…
Reference in a new issue