Sha256: 8e00c53ee43c0acd86548e535abff1f5badf4e65ebc60dbbe549fce67c1b4e9c

Contents?: true

Size: 768 Bytes

Versions: 23

Compression:

Stored size: 768 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('<%= j 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 -%>
})();

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
alchemy_cms-3.1.3 app/views/alchemy/admin/elements/fold.js.erb
alchemy_cms-3.2.0.rc1 app/views/alchemy/admin/elements/fold.js.erb
alchemy_cms-3.2.0.beta app/views/alchemy/admin/elements/fold.js.erb
alchemy_cms-3.1.1 app/views/alchemy/admin/elements/fold.js.erb
alchemy_cms-3.0.4 app/views/alchemy/admin/elements/fold.js.erb
alchemy_cms-3.1.0 app/views/alchemy/admin/elements/fold.js.erb
alchemy_cms-3.1.0.rc3 app/views/alchemy/admin/elements/fold.js.erb
alchemy_cms-3.1.0.rc2 app/views/alchemy/admin/elements/fold.js.erb
alchemy_cms-3.1.0.rc1 app/views/alchemy/admin/elements/fold.js.erb
alchemy_cms-3.1.0.beta6 app/views/alchemy/admin/elements/fold.js.erb
alchemy_cms-3.1.0.beta5 app/views/alchemy/admin/elements/fold.js.erb
alchemy_cms-3.1.0.beta4 app/views/alchemy/admin/elements/fold.js.erb
alchemy_cms-3.0.3 app/views/alchemy/admin/elements/fold.js.erb
alchemy_cms-3.1.0.beta3 app/views/alchemy/admin/elements/fold.js.erb
alchemy_cms-3.1.0.beta2 app/views/alchemy/admin/elements/fold.js.erb
alchemy_cms-3.1.0.beta1 app/views/alchemy/admin/elements/fold.js.erb
alchemy_cms-3.0.2 app/views/alchemy/admin/elements/fold.js.erb
alchemy_cms-3.0.1 app/views/alchemy/admin/elements/fold.js.erb
alchemy_cms-3.0.0 app/views/alchemy/admin/elements/fold.js.erb
alchemy_cms-3.0.0.rc8 app/views/alchemy/admin/elements/fold.js.erb