Sha256: bea80172e6f7e9c01ebfdcbfb18197a2d13a7050f544b5b8b602e3372d96a337

Contents?: true

Size: 747 Bytes

Versions: 16

Compression:

Stored size: 747 Bytes

Contents

(function($) {

  var close = $('<a class="close_elements_from_page_selector" title="<%= _t(:remove) -%>"/>');
  $('#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

16 entries across 16 versions & 1 rubygems

Version Path
alchemy_cms-2.9.1 app/views/alchemy/admin/elements/list.js.erb
alchemy_cms-2.9.0 app/views/alchemy/admin/elements/list.js.erb
alchemy_cms-2.8.3 app/views/alchemy/admin/elements/list.js.erb
alchemy_cms-2.7.5 app/views/alchemy/admin/elements/list.js.erb
alchemy_cms-2.6.3 app/views/alchemy/admin/elements/list.js.erb
alchemy_cms-2.7.4 app/views/alchemy/admin/elements/list.js.erb
alchemy_cms-2.8.2 app/views/alchemy/admin/elements/list.js.erb
alchemy_cms-2.8.1 app/views/alchemy/admin/elements/list.js.erb
alchemy_cms-2.7.3 app/views/alchemy/admin/elements/list.js.erb
alchemy_cms-2.7.2 app/views/alchemy/admin/elements/list.js.erb
alchemy_cms-2.7.1 app/views/alchemy/admin/elements/list.js.erb
alchemy_cms-2.7.0 app/views/alchemy/admin/elements/list.js.erb
alchemy_cms-2.6.2.1 app/views/alchemy/admin/elements/list.js.erb
alchemy_cms-2.6.2 app/views/alchemy/admin/elements/list.js.erb
alchemy_cms-2.6.1 app/views/alchemy/admin/elements/list.js.erb
alchemy_cms-2.6.0 app/views/alchemy/admin/elements/list.js.erb