Sha256: 2a79757be56141299c65eec01bf57c3f33bf4ccccec197ccc72e8d226616badb
Contents?: true
Size: 1.07 KB
Versions: 12
Compression:
Stored size: 1.07 KB
Contents
(function() { var $element_area; var element_html = '<%= j render(Alchemy::ElementEditor.new(@element)) %>'; <%- if @cut_element_id -%> $('.element-editor[data-element-id="<%= @cut_element_id %>"]').remove(); <%- end -%> <% if @element.fixed? %> Alchemy.FixedElements.createTab('<%= @element.id %>', '<%= @element.display_name %>'); $element_area = $('[name="fixed-element-<%= @element.id %>"]'); <% elsif @element.parent_element %> $element_area = $('#element_<%= @element.parent_element_id %> > .nestable-elements > .nested-elements'); <% else %> $element_area = $('#main-content-elements'); <% end %> <%- if @insert_at_top -%> $element_area.prepend(element_html); <%- else -%> $element_area.append(element_html); <%- end -%> Alchemy.growl('<%= Alchemy.t(:successfully_added_element) %>'); Alchemy.closeCurrentDialog(); Alchemy.reloadPreview(); el = document.querySelector('#element_<%= @element.id %>'); el.focusElement(); el.focusElementPreview(); <%- if @clipboard.blank? -%> $('#clipboard_button .icon.clipboard').removeClass('full'); <%- end -%> })();
Version data entries
12 entries across 12 versions & 1 rubygems