angular.module("gameHeaderWithPeriodControl", []) .directive('gameHeaderWithPeriodControl', function() { return { restrict: 'E', replace: true, scope: { slId: '=', game: '=', selectedPeriod: '=', selectPeriod: '&', manpowerSituations: '=', selectManpowerSituation: '&' }, template: '
' + //'
' + // '

{{game.visitors.location}} {{game.visitors.name}}

' + // '
' + // '' + // '
' + //'
' + '
' + '

{{game.date}}

' + //'

VS

' + '' + '

Period

' + '
' + '
' + '
' + '' + '' + '
' + '
' + '
' + '

Manpower Situation

' + '
'+ '
'+ ''+ ''+ ''+ '' + '
'+ '
'+ '
' + //'
' + // '

{{game.home.location}} {{game.home.name}}

' + // '
' + // '' + // '
' + //'
' + '
', controller: function ($scope) { $scope.blurMe = function ($event) { $event.target.blur(); } $scope.selectPeriodInternal = function (periodId) { $scope.selectPeriod({ periodId: periodId, game: $scope.game }); } $scope.selectManpowerSituationInternal = function (manPowerSituation) { $scope.selectManpowerSituation({ manPowerSituation: manPowerSituation, game: $scope.game }); } } // end of controller }; // end of directoive factory })