Sha256: 35516059edcfe6e92ac66b56515fafa3c9f8621753edcc80ee57d9c114127ecf

Contents?: true

Size: 794 Bytes

Versions: 10

Compression:

Stored size: 794 Bytes

Contents

(function($) {
  var $el = $('.element_editor[data-element-id="<%= @element.id %>"]');

<% if @error %>

  $("#element_<%= @element.id -%> .spinner").replaceWith("<span class='error_icon' title='<%= @error -%>'>!</span>");

<% else %>

  $el.replaceWith('<%= escape_javascript render(:partial => "element", :object => @element) -%>');
  $el = $('#element_<%= @element.id %>');
  $('#element_area .sortable_cell').sortable('refresh');
  Alchemy.ElementEditors.reinit($el);

<% if @element.folded %>

  Alchemy.Tinymce.remove(<%= @element.richtext_contents_ids.to_json %>);

<% else %>

  $el.trigger('Alchemy.SelectElementEditor');
  Alchemy.SelectBox($el);
  Alchemy.Tinymce.init(<%= @element.richtext_contents_ids.to_json %>);
  Alchemy.GUI.initElement($el);

<% end %>

<% end %>
})(jQuery);

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
alchemy_cms-2.9.1 app/views/alchemy/admin/elements/fold.js.erb
alchemy_cms-2.9.0 app/views/alchemy/admin/elements/fold.js.erb
alchemy_cms-2.8.3 app/views/alchemy/admin/elements/fold.js.erb
alchemy_cms-2.7.5 app/views/alchemy/admin/elements/fold.js.erb
alchemy_cms-2.7.4 app/views/alchemy/admin/elements/fold.js.erb
alchemy_cms-2.8.2 app/views/alchemy/admin/elements/fold.js.erb
alchemy_cms-2.8.1 app/views/alchemy/admin/elements/fold.js.erb
alchemy_cms-2.7.3 app/views/alchemy/admin/elements/fold.js.erb
alchemy_cms-2.7.2 app/views/alchemy/admin/elements/fold.js.erb
alchemy_cms-2.7.1 app/views/alchemy/admin/elements/fold.js.erb