1window.angular && (function (angular) { 2 'use strict'; 3 4 angular 5 .module('app.common.directives') 6 .directive('firmwareList', ['APIUtils', function (APIUtils) { 7 return { 8 'restrict': 'E', 9 'template': require('./firmware-list.html'), 10 'scope': { 11 'title': '@', 12 'firmwares': '=', 13 'filterBy': '=', 14 'version': '=' 15 }, 16 'controller': ['$rootScope', '$scope','dataService', '$location', '$timeout', function($rootScope, $scope, dataService, $location, $timeout){ 17 $scope.dataService = dataService; 18 $scope.activate = function(imageId, imageVersion, imageType){ 19 $scope.$parent.activateImage(imageId, imageVersion, imageType); 20 } 21 22 $scope.delete = function(imageId, imageVersion){ 23 $scope.$parent.deleteImage(imageId, imageVersion); 24 } 25 26 $scope.changePriority = function(imageId, imageVersion, from, to){ 27 $scope.$parent.changePriority(imageId, imageVersion, from, to); 28 } 29 }] 30 }; 31 }]); 32})(window.angular); 33