Sha256: e0335e6e849d81f4625bb050d6753e11715e33d64e48eda60e499922ec9ed228

Contents?: true

Size: 863 Bytes

Versions: 50

Compression:

Stored size: 863 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(Alchemy::ElementEditor.new(@element)) %>');
  $el = $('#element_<%= @element.id %>');
  $('#element_area .sortable-elements').sortable('refresh');

  <% if @element.folded? -%>

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

  <% else -%>

  $el.trigger('FocusElementEditor.Alchemy');
  Alchemy.Tinymce.init(<%= @element.richtext_contents_ids.to_json %>);
  Alchemy.GUI.initElement($el);
  Alchemy.SortableElements(
    <%= @page.id %>,
    '<%= form_authenticity_token %>',
    $('> .nestable-elements .nested-elements', $el)
  );

  <% end -%>

<% end -%>
})();

Version data entries

50 entries across 50 versions & 1 rubygems

Version Path
alchemy_cms-5.3.8 app/views/alchemy/admin/elements/fold.js.erb
alchemy_cms-5.3.7 app/views/alchemy/admin/elements/fold.js.erb
alchemy_cms-5.3.6 app/views/alchemy/admin/elements/fold.js.erb
alchemy_cms-5.3.5 app/views/alchemy/admin/elements/fold.js.erb
alchemy_cms-5.3.4 app/views/alchemy/admin/elements/fold.js.erb
alchemy_cms-5.3.3 app/views/alchemy/admin/elements/fold.js.erb
alchemy_cms-5.3.2 app/views/alchemy/admin/elements/fold.js.erb
alchemy_cms-5.3.1 app/views/alchemy/admin/elements/fold.js.erb
alchemy_cms-5.3.0 app/views/alchemy/admin/elements/fold.js.erb
alchemy_cms-5.2.7 app/views/alchemy/admin/elements/fold.js.erb
alchemy_cms-5.2.6 app/views/alchemy/admin/elements/fold.js.erb
alchemy_cms-5.1.10 app/views/alchemy/admin/elements/fold.js.erb
alchemy_cms-5.0.10 app/views/alchemy/admin/elements/fold.js.erb
alchemy_cms-5.2.5 app/views/alchemy/admin/elements/fold.js.erb
alchemy_cms-5.1.9 app/views/alchemy/admin/elements/fold.js.erb
alchemy_cms-5.0.9 app/views/alchemy/admin/elements/fold.js.erb
alchemy_cms-5.2.4 app/views/alchemy/admin/elements/fold.js.erb
alchemy_cms-5.1.8 app/views/alchemy/admin/elements/fold.js.erb
alchemy_cms-5.0.8 app/views/alchemy/admin/elements/fold.js.erb
alchemy_cms-5.0.7 app/views/alchemy/admin/elements/fold.js.erb