fix delete attachment on creation
parent
b2860e8a53
commit
ca702689dc
|
@ -292,7 +292,8 @@ CreateEditUserstoryDirective = ($repo, $model, $rs, $rootScope, lightboxService,
|
|||
attachmentsToAdd = attachmentsToAdd.push(attachment)
|
||||
|
||||
$scope.deleteAttachment = (attachment) ->
|
||||
attachmentsToDelete = attachmentsToDelete.push(attachment)
|
||||
if attachment.get("id")
|
||||
attachmentsToDelete = attachmentsToDelete.push(attachment)
|
||||
|
||||
$scope.$on "usform:new", (ctx, projectId, status, statusList) ->
|
||||
form.reset() if form
|
||||
|
|
|
@ -41,7 +41,8 @@ CreateEditTaskDirective = ($repo, $model, $rs, $rootscope, $loading, lightboxSer
|
|||
attachmentsToAdd = attachmentsToAdd.push(attachment)
|
||||
|
||||
$scope.deleteAttachment = (attachment) ->
|
||||
attachmentsToDelete = attachmentsToDelete.push(attachment)
|
||||
if attachment.get("id")
|
||||
attachmentsToDelete = attachmentsToDelete.push(attachment)
|
||||
|
||||
createAttachments = (obj) ->
|
||||
promises = _.map attachmentsToAdd.toJS(), (attachment) ->
|
||||
|
|
Loading…
Reference in New Issue