Sha256: a8f5efda9cdae6cdb03f2b2264a74b8dab62f8bf7350ce861e98a980c13ee26d

Contents?: true

Size: 1.12 KB

Versions: 11

Compression:

Stored size: 1.12 KB

Contents

(function($) {
  
  <%- if @error -%>
  
  $("#element_<%= @element.id -%>_folder_spinner").replaceWith("<span class='error_icon' title='<%= @error -%>'>!</span>");
  
  <%- else -%>
  
  $('#element_<%= @element.id -%>').replaceWith('<%= escape_javascript render(:partial => "element", :object => @element) -%>');
  $('#element_area').sortable('refresh');
  Alchemy.ElementEditorSelector.bindEvent('#element_<%= @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 -%>
    
    $('#element_<%= @element.id -%>').trigger('Alchemy.SelectElementEditor');
    Alchemy.SelectBox('#element_<%= @element.id -%> select');
    
    <%- @element.rtf_contents.each do |content| -%>
    TinymceHammer.addEditor('<%= content.form_field_id -%>');
    <%- end -%>
    
    Alchemy.ElementDirtyObserver('#element_<%= @element.id -%>');
  <%- end -%>
  
  <%- end -%>
  
})(jQuery);

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
alchemy_cms-2.0 app/views/admin/elements/fold.js.erb
alchemy_cms-2.0.rc6 app/views/admin/elements/fold.js.erb
alchemy_cms-2.0.rc5 app/views/admin/elements/fold.js.erb
alchemy_cms-2.0.rc4 app/views/admin/elements/fold.js.erb
alchemy_cms-2.0.rc3 app/views/admin/elements/fold.js.erb
alchemy_cms-2.0.rc2 app/views/admin/elements/fold.js.erb
alchemy_cms-2.0.rc1 app/views/admin/elements/fold.js.erb
alchemy_cms-2.0.pre5 app/views/admin/elements/fold.js.erb
alchemy_cms-2.0.pre4 app/views/admin/elements/fold.js.erb
alchemy_cms-2.0.pre3 app/views/admin/elements/fold.js.erb
alchemy_cms-2.0.pre2 app/views/admin/elements/fold.js.erb