From 246eadb3fd09256c28bf7c9f189f5c6a29141127 Mon Sep 17 00:00:00 2001 From: Didier Lafforgue Date: Fri, 20 Apr 2012 13:11:50 +0200 Subject: [PATCH] fix issue #374 --- .../locomotive/views/editable_elements/file_view.js.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/locomotive/views/editable_elements/file_view.js.coffee b/app/assets/javascripts/locomotive/views/editable_elements/file_view.js.coffee index 821f6f68..400b2ea7 100644 --- a/app/assets/javascripts/locomotive/views/editable_elements/file_view.js.coffee +++ b/app/assets/javascripts/locomotive/views/editable_elements/file_view.js.coffee @@ -38,7 +38,8 @@ class Locomotive.Views.EditableElements.FileView extends Backbone.View on_change: => @$('a:first').hide() & @$('input[type=file]').show() & @$('a.delete').hide() on_cancel: => - @$('a:first').show() & @$('input[type=file]').hide() & @$('a.delete').show() + @model.set(source: null) + @$('a:first').show() & @$('input[type=file]').val('').hide() & @$('a.delete').show() toggle_delete: (event) -> @_toggle event, 'delete',