blob: 781257eeea3f51d6411e2b04550d3e8cb499cd35 [file] [log] [blame]
window.angular && (function (angular) {
'use strict';
angular
.module('app.common.directives')
.directive('firmwareList', ['APIUtils', function (APIUtils) {
return {
'restrict': 'E',
'template': require('./firmware-list.html'),
'scope': {
'title': '@',
'firmwares': '=',
'filterBy': '=',
'version': '='
},
'controller': ['$rootScope', '$scope','dataService', '$location', '$timeout', function($rootScope, $scope, dataService, $location, $timeout){
$scope.dataService = dataService;
$scope.activate = function(imageId){
$scope.$parent.activateImage(imageId);
}
$scope.delete = function(imageId){
$scope.$parent.deleteImage(imageId);
}
$scope.changePriority = function(imageId, from, to){
$scope.$parent.changePriority(imageId, from, to);
}
}]
};
}]);
})(window.angular);