Sha256: 0c2c4344aac76c97792e599bde1f5e425222c0a3f5a19915d37887f32eb198f7
Contents?: true
Size: 1.39 KB
Versions: 25
Compression:
Stored size: 1.39 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 @insert_at_top -%> $element_area.prepend(element_html); <%- else -%> $element_area.append(element_html); <%- 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
25 entries across 25 versions & 2 rubygems