OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openproject/frontend/app/work_packages/directives/work-package-attachments-di...

24 lines
438 B

module.exports = function(Upload) {
var attachmentsController = function(scope) {
scope.remove = function(file) {
_.remove(scope.files, function(element) {
return file === element;
})
}
scope.removeAll = function() {
scope.files = []
}
}
return {
restrict: 'E',
replace: true,
templateUrl: '/templates/work_packages/attachments.html',
link: attachmentsController
}
}