Sha256: 6749841e32653337022679db5774ce3991e9e7a03284f3fd79d19b36103cedd0

Contents?: true

Size: 1.2 KB

Versions: 8

Compression:

Stored size: 1.2 KB

Contents

var $el = $('#element_<%= @element.id %>');
<% if @element_validated %>

$('div.element_handle span.icon', $el).removeClass('element_<%= @element.public? ? "draft" : "public" %>').addClass('element_<%= @element.public? ? "public" : "draft" %>');
$('.element_heading .preview_text_element_name', $el).html('<%= @element.display_name %>');
$('.element_heading .preview_text_quote', $el).html('<%= escape_javascript(@element.preview_text) %>');
$('div.content_editor').removeClass('validation_failed');
$("#element_<%= @element.id %>_errors").hide();
Alchemy.setElementSaved($el);
Alchemy.growl('<%= t("element_saved") %>');
Alchemy.PreviewWindow.refresh();

<%=raw update_elements_with_essence_selects(@page, @element) %>

<% else %>

Alchemy.growl('<%= escape_javascript(@notice) %>', 'warn');
$('#element_<%= @element.id %>_errors').html('<%= @error_message %><ul><li><%= @element.essence_error_messages.join("</li><li>").html_safe %></li></ul>');
$("#element_<%= @element.id %>_errors").show();
$('div.content_editor').removeClass('validation_failed');
$('<%= @element.contents_with_errors.map { |content| "#" + content_dom_id(content) }.join(", ") %>').addClass('validation_failed');
Alchemy.Buttons.enable($el);

<% end %>

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
alchemy_cms-2.4.1 app/views/alchemy/admin/elements/update.js.erb
alchemy_cms-2.5.0.b5 app/views/alchemy/admin/elements/update.js.erb
alchemy_cms-2.5.0.b2 app/views/alchemy/admin/elements/update.js.erb
alchemy_cms-2.4.0 app/views/alchemy/admin/elements/update.js.erb
alchemy_cms-2.4.rc4 app/views/alchemy/admin/elements/update.js.erb
alchemy_cms-2.4.rc2 app/views/alchemy/admin/elements/update.js.erb
alchemy_cms-2.4.rc1 app/views/alchemy/admin/elements/update.js.erb
alchemy_cms-2.4.beta2 app/views/alchemy/admin/elements/update.js.erb