Sha256: 796b288901f1be2b611fcdad897d140ebb22f9c80c8c493f7fc6a0bbe3596ec2
Contents?: true
Size: 1.34 KB
Versions: 2
Compression:
Stored size: 1.34 KB
Contents
var $el; var $element_area; var element_html = '<%= escape_javascript render(:partial => "element", :object => @element, :locals => {:draggable => true}) -%>'; <% if @cutted_element_id %> $('.element_editor[data-element-id="<%= @cutted_element_id %>"]').remove(); <% end %> <% if @page.can_have_cells? %> Alchemy.selectOrCreateCellTab('<%= @cell_name -%>', '<%= @cell.nil? ? _t("other Elements") : @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.closeCurrentWindow(); <% @element.contents.essence_richtexts.each do |content| %> Alchemy.Tinymce.addEditor('<%= content.form_field_id -%>'); <% end %> Alchemy.PreviewWindow.refresh(); Alchemy.ElementEditorSelector.init(); $el = $('#element_<%= @element.id -%>'); $el.trigger('Alchemy.SelectElementEditor'); Alchemy.GUI.initElement($el); <% if @clipboard.blank? %> $('#clipboard_button .icon.clipboard').removeClass('full'); <% end %> <%=raw update_elements_with_essence_selects(@page, @element) %>
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
alchemy_cms-2.5.0.rc3 | app/views/alchemy/admin/elements/create.js.erb |
alchemy_cms-2.5.0.b9 | app/views/alchemy/admin/elements/create.js.erb |