Skip to content

Commit

Permalink
fix remove correct image in edit element content picture
Browse files Browse the repository at this point in the history
  • Loading branch information
Alessandro Baccanelli committed Apr 7, 2020
1 parent a43a746 commit 37d4bfd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/assets/javascripts/alchemy/alchemy.base.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,13 @@ $.extend Alchemy,
removePicture: (selector) ->
$form_field = $(selector)
$element = $form_field.closest(".element-editor")
$content = $form_field.closest(".content_editor")
if $form_field[0]
$form_field.val ""
$element.find(".thumbnail_background").html('<i class="icon far fa-image fa-fw"/>')
$content.find(".thumbnail_background").html('<i class="icon far fa-image fa-fw"/>')
Alchemy.setElementDirty $element
false

# Initializes all select tag with .alchemy_selectbox class as select2 instance
# Pass a jQuery scope to only init a subset of selectboxes.
SelectBox: (scope) ->
Expand Down

0 comments on commit 37d4bfd

Please sign in to comment.