(fix) DI annotation of sgIMAP controller

pull/91/head
Francis Lachapelle 2015-07-28 14:37:49 -04:00
parent d7aae0e667
commit 433983e7c4
1 changed files with 25 additions and 20 deletions

View File

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