Sha256: 82398f35c3f676eec10480bc482ec35b996d78df8875a0212ace79453c3f63d4

Contents?: true

Size: 752 Bytes

Versions: 12

Compression:

Stored size: 752 Bytes

Contents

(function($) {

  var close = $('<a class="close_elements_from_page_selector" title="<%= t(:remove) -%>">–</a>');
  $('#elements_for_page_<%= @page_id -%>').html('<%= escape_javascript(render("elements_select")) %>');
  $('#elements_for_page_<%= @page_id -%>').append(close);

  close.on('click', function() {
    Alchemy.LinkOverlay.hideElementsSelect(<%= @page_id -%>);
  });

  <%- unless @elements.first.blank? -%>
  $('#page_anchor').val('#<%= @elements.first.dom_id -%>');
  <%- end -%>

  <%- if params[:internal_anchor] -%>
  $('select.elements_from_page_selector').val('#<%= params[:internal_anchor] -%>');
  $('#page_anchor').val('#<%= params[:internal_anchor] -%>');
  <%- end -%>

  Alchemy.SelectBox('#alchemyLinkOverlay');

})(jQuery);

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
alchemy_cms-2.3.2 app/views/alchemy/admin/elements/list.js.erb
alchemy_cms-2.4.1 app/views/alchemy/admin/elements/list.js.erb
alchemy_cms-2.5.0.b5 app/views/alchemy/admin/elements/list.js.erb
alchemy_cms-2.5.0.b2 app/views/alchemy/admin/elements/list.js.erb
alchemy_cms-2.4.0 app/views/alchemy/admin/elements/list.js.erb
alchemy_cms-2.4.rc4 app/views/alchemy/admin/elements/list.js.erb
alchemy_cms-2.4.rc2 app/views/alchemy/admin/elements/list.js.erb
alchemy_cms-2.4.rc1 app/views/alchemy/admin/elements/list.js.erb
alchemy_cms-2.3.1 app/views/alchemy/admin/elements/list.js.erb
alchemy_cms-2.4.beta2 app/views/alchemy/admin/elements/list.js.erb
alchemy_cms-2.3.0 app/views/alchemy/admin/elements/list.js.erb
alchemy_cms-2.3.rc5 app/views/alchemy/admin/elements/list.js.erb