blob: 6cfa3a1a1a1c24c2f5117bb11f4cea17893f84b3 [file] [log] [blame]
Iftekharul Islamc0161392017-06-14 15:46:15 -05001window.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 'templateUrl': 'common/directives/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){
19 $scope.$parent.activateImage(imageId);
20 }
21
22 $scope.delete = function(imageId){
23 $scope.$parent.deleteImage(imageId);
24 }
Iftekharul Islam1acb4122017-11-02 13:20:32 -050025
26 $scope.changePriority = function(imageId, from, to){
27 $scope.$parent.changePriority(imageId, from, to);
28 }
Iftekharul Islamc0161392017-06-14 15:46:15 -050029 }]
30 };
31 }]);
32})(window.angular);