Sha256: b4b235fb89a09e513739d77ab3cb8a304a6c0ce02d419ac7a17a446615254b3a
Contents?: true
Size: 1.28 KB
Versions: 7
Compression:
Stored size: 1.28 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? %> if ($('#fixed-elements').length == 0) { Alchemy.FixedElements.buildTabs('<%= Alchemy.t(:main_content) %>'); } 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 -%> <% if @element.fixed? %> Alchemy.SortableElements('[name="fixed-element-<%= @element.id %>"] .nested-elements'); <% end %> Alchemy.growl('<%= Alchemy.t(:successfully_added_element) %>'); Alchemy.closeCurrentDialog(); el = document.querySelector('#element_<%= @element.id %>'); el.focusElement(); el.focusElementPreview(); <%- if @clipboard.blank? -%> $('#clipboard_button .icon.clipboard').removeClass('full'); <%- end -%> })();
Version data entries
7 entries across 7 versions & 1 rubygems