Merge pull request #594 from taigaio/issue/3101/deprecating-attachment

set isCreatedRightNow to false after the save
stable
Alejandro 2015-08-04 14:09:38 +02:00
commit e0623ea81d
1 changed files with 2 additions and 1 deletions

View File

@ -283,6 +283,7 @@ AttachmentDirective = ($template, $compile, $translate) ->
saveAttachment = ->
attachment.description = $el.find("input[name='description']").val()
attachment.is_deprecated = $el.find("input[name='is-deprecated']").prop("checked")
attachment.isCreatedRightNow = false
$scope.$apply ->
$ctrl.updateAttachment(attachment).then ->
@ -297,7 +298,7 @@ AttachmentDirective = ($template, $compile, $translate) ->
if event.keyCode == 13
saveAttachment()
else if event.keyCode == 27
render(attachment, false)
$scope.$apply -> render(attachment, false)
$el.on "click", "a.editable-settings.icon-delete", (event) ->
event.preventDefault()