Sha256: fc36ef838571beeca5d3dcdb1e60f8a7491635029e9eb453d49b9d67e8766624
Contents?: true
Size: 1.34 KB
Versions: 7
Compression:
Stored size: 1.34 KB
Contents
(function($) { <%- if @element_validated -%> $('div#element_<%= @element.id -%> div.element_handle span.icon').removeClass('element_<%= @element.public? ? "draft" : "public" -%>').addClass('element_<%= @element.public? ? "public" : "draft" -%>'); $('.element_editor[data-element-id="<%= @element.id -%>"] .element_heading .preview_text_element_name').text('<%= @element.display_name -%>'); $('.element_editor[data-element-id="<%= @element.id -%>"] .element_heading .preview_text_quote').text('<%= escape_javascript(@element.preview_text) -%>'); $('div.content_editor').removeClass('validation_failed'); $("#element_<%= @element.id -%>_errors").hide(); Alchemy.setElementSaved('#element_<%= @element.id -%>'); Alchemy.growl('<%= _("element_saved") -%>'); Alchemy.PreviewWindow.refresh(); <%- else -%> Alchemy.growl('<%= escape_javascript(@notice) %>', 'warn'); $('#element_<%= @element.id %>_errors').html('<%= @error_message %><ul><li><%= @element.essence_error_messages.join("</li><li>") %></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.enableButton('#element_<%= @element.id %> button.button'); <%- end -%> })(jQuery);
Version data entries
7 entries across 7 versions & 1 rubygems