app/views/alchemy/admin/contents/create.js.erb in alchemy_cms-2.3.0 vs app/views/alchemy/admin/contents/create.js.erb in alchemy_cms-2.3.1
- old
+ new
@@ -16,18 +16,19 @@
:partial => "alchemy/essences/#{@content.essence_partial_name}_editor",
:locals => @locals
)
) %>');
Alchemy.enableButton('.disabled.button');
- Alchemy.overlayObserver('#<%= content_dom_id(@content) %>');
Alchemy.growl('<%= t("Successfully added content") % {:content => @content.name_for_label} %>')
<% end %>
<% if @content.essence_type == "Alchemy::EssencePicture" %>
+ <% if @content.ingredient %>
$('#picture_to_assign_<%= @content.ingredient.id %> a').attr('href', '#').off('click');
+ <% end %>
<% if @contents_of_this_type.length > 1 %>
$('#element_<%= @element.id %>_contents .essence_picture_editor').addClass('dragable_picture');
<% end %>
@@ -48,7 +49,8 @@
<% end %>
Alchemy.reloadPreview();
Alchemy.closeCurrentWindow();
Alchemy.SelectBox("#element_<%= @element.id %>");
+ Alchemy.overlayObserver('#<%= content_dom_id(@content) %>');
})()