admin: Able to import Cyberrange teams from interface
This commit is contained in:
parent
f1ada8ce99
commit
485e6b0173
4 changed files with 64 additions and 8 deletions
|
@ -81,6 +81,22 @@ angular.module("FICApp")
|
|||
});
|
||||
}
|
||||
}
|
||||
}])
|
||||
.directive('fileModel', ['$parse', function ($parse) {
|
||||
return {
|
||||
restrict: 'A',
|
||||
link: function($scope, element, attrs) {
|
||||
var model = $parse(attrs.fileModel);
|
||||
var modelSetter = model.assign;
|
||||
|
||||
element.bind('change', function(){
|
||||
$scope.$apply(function(){
|
||||
modelSetter($scope, element[0].files[0]);
|
||||
$scope.uploadFile();
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
}]);
|
||||
|
||||
angular.module("FICApp")
|
||||
|
|
Reference in a new issue