From 55b2cad4872b709b948b0c8006604b61e6918637 Mon Sep 17 00:00:00 2001 From: Juanfran Date: Wed, 29 Jul 2015 12:23:24 +0200 Subject: [PATCH] set isCreatedRightNow to false after the save scope apply after ESC --- app/coffee/modules/common/attachments.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/coffee/modules/common/attachments.coffee b/app/coffee/modules/common/attachments.coffee index 6f269935..1102715d 100644 --- a/app/coffee/modules/common/attachments.coffee +++ b/app/coffee/modules/common/attachments.coffee @@ -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()