|
|
@ -40,9 +40,12 @@ module.exports = function( |
|
|
|
|
|
|
|
|
|
|
|
var workPackage = scope.workPackage(), |
|
|
|
var workPackage = scope.workPackage(), |
|
|
|
upload = function(event, workPackage) { |
|
|
|
upload = function(event, workPackage) { |
|
|
|
workPackageAttachmentsService.upload(workPackage, scope.files).then(function() { |
|
|
|
if (scope.files.length > 0) { |
|
|
|
scope.files = []; |
|
|
|
workPackageAttachmentsService.upload(workPackage, scope.files).then(function() { |
|
|
|
}).finally(loadAttachments); |
|
|
|
scope.files = []; |
|
|
|
|
|
|
|
loadAttachments() |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}; |
|
|
|
}, |
|
|
|
}, |
|
|
|
loadAttachments = function() { |
|
|
|
loadAttachments = function() { |
|
|
|
if (!editMode(attrs)) { |
|
|
|
if (!editMode(attrs)) { |
|
|
|