Sha256: bbfcb2350073abb88965bcd92fb615284a45c6b083fd7a9f1e242bf726da5d18
Contents?: true
Size: 1.22 KB
Versions: 16
Compression:
Stored size: 1.22 KB
Contents
(function($) { var $el = $('.element_editor[data-element-id="<%= @element.id %>"]'); <%- if @error -%> $("#element_<%= @element.id -%>_folder_spinner").replaceWith("<span class='error_icon' title='<%= @error -%>'>!</span>"); <%- else -%> $el = $el.replaceWith('<%= escape_javascript render(:partial => "element", :object => @element) -%>'); $('#element_area .sortable_cell').sortable('refresh'); Alchemy.ElementEditorSelector.reinit('.element_editor[data-element-id="<%= @element.id %>"]'); <%- if @element.folded -%> <%- @element.rtf_contents.each do |content| -%> rtf_<%= content.id -%> = tinymce.get('<%= content.form_field_id -%>'); if (rtf_<%= content.id -%>) { rtf_<%= content.id -%>.remove(); }; delete rtf_<%= content.id -%>; <%- end -%> <%- else -%> $el.trigger('Alchemy.SelectElementEditor'); Alchemy.SelectBox('select', $el); <%- @element.rtf_contents.each do |content| -%> Alchemy.Tinymce.addEditor('<%= content.form_field_id -%>'); <%- end -%> Alchemy.ElementDirtyObserver($el); Alchemy.Datepicker('input[type="date"]', $el); Alchemy.ButtonObserver('button.button', $el); <%- end -%> <%- end -%> })(jQuery);
Version data entries
16 entries across 16 versions & 1 rubygems