Sha256: 50a6d185071dd5d6abaac0f8df00646937df2cdcfeeda7e54e982f81c1b9851d

Contents?: true

Size: 1.47 KB

Versions: 21

Compression:

Stored size: 1.47 KB

Contents

<% if params[:was_missing] %>

$("[data-element-<%= @element.id %>-missing-content=\"<%= @content.name %>\"]").replaceWith('<%= j(
  render(
    partial: "alchemy/essences/#{@content.essence_partial_name}_editor",
    locals: @locals
  )
) %>');

<% else %>

$("<%= @content_dom_id %>").before('<%= j(
  render(
    partial: "alchemy/essences/#{@content.essence_partial_name}_editor",
    locals: @locals
  )
) %>');
Alchemy.Buttons.enable();
Alchemy.growl('<%= j Alchemy.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 @gallery_pictures %>

<% if @gallery_pictures.size > 1 %>
$('#element_<%= @element.id %>_contents .essence_picture_editor').addClass('dragable_picture');
<% end %>

<% if !max_image_count.blank? && @gallery_pictures.size >= max_image_count %>
$("#add_picture_<%= @element.id %>").remove();
<% end %>

Alchemy.SortableContents('#element_<%= @element.id %>_contents', '<%= form_authenticity_token %>');

<% end %>

<% elsif @content.essence_type == "Alchemy::EssenceDate" %>

Alchemy.Datepicker('#element_<%= @element.id %>');

<% elsif @content.essence_type == "Alchemy::EssenceRichtext" %>

Alchemy.Tinymce.initEditor(<%= @content.id %>);

<% end %>

Alchemy.reloadPreview();
Alchemy.closeCurrentDialog();
Alchemy.SelectBox("#element_<%= @element.id %>");

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
alchemy_cms-3.6.7 app/views/alchemy/admin/contents/create.js.erb
alchemy_cms-3.6.6 app/views/alchemy/admin/contents/create.js.erb
alchemy_cms-3.6.5 app/views/alchemy/admin/contents/create.js.erb
alchemy_cms-3.6.4 app/views/alchemy/admin/contents/create.js.erb
alchemy_cms-3.6.3 app/views/alchemy/admin/contents/create.js.erb
alchemy_cms-3.6.2 app/views/alchemy/admin/contents/create.js.erb
alchemy_cms-3.6.1 app/views/alchemy/admin/contents/create.js.erb
alchemy_cms-4.0.0.beta app/views/alchemy/admin/contents/create.js.erb
alchemy_cms-3.6.0 app/views/alchemy/admin/contents/create.js.erb
alchemy_cms-3.5.0 app/views/alchemy/admin/contents/create.js.erb
alchemy_cms-3.4.2 app/views/alchemy/admin/contents/create.js.erb
alchemy_cms-3.5.0.rc2 app/views/alchemy/admin/contents/create.js.erb
alchemy_cms-3.5.0.rc1 app/views/alchemy/admin/contents/create.js.erb
alchemy_cms-3.4.1 app/views/alchemy/admin/contents/create.js.erb
alchemy_cms-3.3.3 app/views/alchemy/admin/contents/create.js.erb
alchemy_cms-3.3.2 app/views/alchemy/admin/contents/create.js.erb
alchemy_cms-3.4.0 app/views/alchemy/admin/contents/create.js.erb
alchemy_cms-3.4.0.rc1 app/views/alchemy/admin/contents/create.js.erb
alchemy_cms-3.3.1 app/views/alchemy/admin/contents/create.js.erb
alchemy_cms-3.3.0 app/views/alchemy/admin/contents/create.js.erb