Sha256: 51109d5d061f926bb1006b364f06be54e3e3943710266227dc91a677956f1925
Contents?: true
Size: 1.33 KB
Versions: 17
Compression:
Stored size: 1.33 KB
Contents
<% if params[:remove] -%> $(".element-editor[data-element-id='<%= @item.id %>']").remove(); <% if @item.class.name == 'Alchemy::Element' -%> $('#element_area .sortable-elements').sortable('refresh'); <% if @item.fixed? -%> Alchemy.FixedElements.removeTab(<%= @item.id %>); <% end -%> <% end -%> Alchemy.growl('<%= j Alchemy.t("item moved to clipboard", name: @item.class.name == "Alchemy::Element" ? @item.display_name_with_preview_text : @item.name) %>'); <% else -%> Alchemy.growl('<%= j Alchemy.t("item copied to clipboard", name: @item.class.name == "Alchemy::Element" ? @item.display_name_with_preview_text : @item.name) %>') <% end -%> $('#clipboard_button .icon').removeClass('ri-clipboard-line').addClass('ri-clipboard-fill'); <%# Update add nested element forms for any elements that accept ONLY this as a nested element %> <% if @item.class == Alchemy::Element %> if (window.location.pathname == "<%= edit_admin_page_path(@item.page.id) %>") { <% @item.page.draft_version.elements.expanded.select do |element| element.definition["nestable_elements"] == [@item.name] end.each do |element| %> $(".add-nested-element[data-element-id='<%= element.id %>']").replaceWith('<%= j render "alchemy/admin/elements/add_nested_element_form", element: element %>') <% end %> } <% end %>
Version data entries
17 entries across 17 versions & 1 rubygems