Sha256: 0ed426ddf47d22ee5f0eaee5a35b55ac55a5fbaa5042c79cc32c4aa69b61a0de
Contents?: true
Size: 1.45 KB
Versions: 2
Compression:
Stored size: 1.45 KB
Contents
(function() { var $el; var $element_area; var element_html = '<%= j render("element", element: @element, draggable: true) %>'; <%- if @cutted_element_id -%> $('.element_editor[data-element-id="<%= @cutted_element_id %>"]').remove(); <%- end -%> <%- if @page.can_have_cells? -%> if ($('#cells').length == 0) { Alchemy.buildTabbedCells('<%= _t(:main_content) %>'); } Alchemy.selectOrCreateCellTab('<%= @cell_name %>', '<%= @cell.nil? ? _t(:main_content) : @cell.name_for_label %>'); <%- end -%> $element_area = $('#cell_<%= @cell_name %>'); <%- if @element_before -%> $('#element_<%= @element_before.id %>').after(element_html); <%- else -%> $('#insert_element_top').after(element_html).removeClass('expanded'); <%- end -%> if ($element_area.find('.element_editor').length > 0) { Alchemy.SortableElements(<%= @page.id %>, '<%= form_authenticity_token %>', $element_area); } else { $element_area.sortable('refresh'); } Alchemy.growl('<%= _t(:successfully_added_element) %>'); Alchemy.closeCurrentDialog(); Alchemy.Tinymce.init(<%= @element.richtext_contents_ids.to_json %>); Alchemy.PreviewWindow.refresh(); Alchemy.ElementEditors.init(); $el = $('#element_<%= @element.id %>'); $el.trigger('Alchemy.SelectElementEditor'); Alchemy.GUI.initElement($el); <%- if @clipboard.blank? -%> $('#clipboard_button .icon.clipboard').removeClass('full'); <%- end -%> <%= update_essence_select_elements(@page, @element) -%> })();
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
alchemy_cms-3.0.0.rc7 | app/views/alchemy/admin/elements/create.js.erb |
alchemy_cms-3.0.0.rc6 | app/views/alchemy/admin/elements/create.js.erb |