app/views/alchemy/admin/essence_files/assign.js.erb in alchemy_cms-2.9.1 vs app/views/alchemy/admin/essence_files/assign.js.erb in alchemy_cms-3.0.0.rc5

- old
+ new

@@ -1,14 +1,9 @@ -(function($) { - $('#<%= content_dom_id(@content) %>').replaceWith('<%= escape_javascript( - render partial: "alchemy/essences/essence_file_editor", - formats: [:html], - locals: { - content: @content, - options: @options - } - ) %>'); - Alchemy.closeCurrentWindow(); - Alchemy.reloadPreview(); - Alchemy.setElementDirty($('#element_<%= @content.element.id %>')); - Alchemy.overlayObserver($('#<%= content_dom_id(@content) %>')); -})(jQuery); +$('#<%= @content.dom_id %>').replaceWith('<%= j( + render "alchemy/essences/essence_file_editor", + formats: [:html], + content: @content, + options: @options +) %>'); +Alchemy.closeCurrentDialog(); +Alchemy.setElementDirty($('#element_<%= @content.element.id %>')); +Alchemy.watchForDialogs($('#<%= @content.dom_id %>'));