Sha256: 670732790d4958b3063944e21a404291cf465e8797c768b2226f15ce64817d24

Contents?: true

Size: 1.36 KB

Versions: 1

Compression:

Stored size: 1.36 KB

Contents

(function($) {

	<% if @cutted_element_id %>
		$('.element_editor[data-element-id="<%= @cutted_element_id %>"]').remove();
	<% end %>

	<%- if @page.can_have_cells? -%>
		Alchemy.selectOrCreateCellTab('<%= @cell.nil? ? "for_other_elements" : @cell.name -%>', '<%= @cell.nil? ? t("other Elements") : @cell.name_for_label -%>');
	<%- end -%>

	$('#cell_<%= @cell.nil? ? "for_other_elements" : @cell.name -%>').append('<%= escape_javascript render(:partial => "element", :object => @element, :locals => {:draggable => true}) -%>');
	$('#cell_<%= @cell.nil? ? "for_other_elements" : @cell.name -%>').sortable('refresh');
	Alchemy.growl('<%= t("successfully_added_element") -%>');
	Alchemy.closeCurrentWindow();

	<%- @element.rtf_contents.each do |content| -%>
		Alchemy.Tinymce.addEditor('<%= content.form_field_id -%>');
	<%- end -%>

	Alchemy.PreviewWindow.refresh();
	Alchemy.ElementEditorSelector.init();
	$('.element_editor[data-element-id="<%= @element.id -%>"]').trigger('Alchemy.SelectElementEditor');
	Alchemy.ElementDirtyObserver('#element_<%= @element.id -%>');
	Alchemy.SelectBox('#element_<%= @element.id -%> select');
	Alchemy.ButtonObserver('#element_<%= @element.id -%> button.button');
	Alchemy.Datepicker('#element_<%= @element.id -%> input[type="date"]');

	<%- if @clipboard.blank? -%>
		$('#clipboard_button .icon.clipboard').removeClass('full');
	<%- end -%>

})(jQuery);

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
alchemy_cms-2.1.5 app/views/alchemy/admin/elements/create.js.erb