<script type="text/javascript" >
  var refinery = window.refinery || {};
  refinery.current_admin_locale = '<%= current_admin_locale %>';
</script>
<%= javascript_include_tag 'admin' -%>
<%= javascript_include_tag 'refinery/refinery' -%>
<% visual_editor_javascripts.each do |js| %>
  <%= javascript_include_tag js %>
<% end %>
<%= javascript_include_tag 'refinery/application' -%>
<%= yield :after_javascript_libraries -%>
<% custom_javascripts.each do |js| %>
  <%= javascript_include_tag js %>
<% end %>
<%= yield :javascripts %>

<% if controller.class.respond_to?(:xhr_pageable?) && !controller.class.xhr_pageable? %>
  <script>
    $(document).ready(function() {
      $('.pagination_container .pagination a').off('click');
    });
  </script>
<% end %>

<script type="text/javascript" >
  var refinery = window.refinery || {};
  refinery.current_admin_locale = '<%= current_admin_locale %>';
</script>
<%= javascript_include_tag 'admin' -%>
<%= javascript_include_tag 'refinery/refinery' -%>
<%= javascript_include_tag 'refinery/application' -%>
<% visual_editor_javascripts.each do |js| %>
  <%= javascript_include_tag js %>
<% end %>
<%= yield :after_javascript_libraries -%>
<% custom_javascripts.each do |js| %>
  <%= javascript_include_tag js %>
<% end %>
<%= yield :javascripts %>

<% if controller.class.respond_to?(:xhr_pageable?) && !controller.class.xhr_pageable? %>
  <script>
    $(document).ready(function() {
      $('.pagination_container .pagination a').off('click');
    });
  </script>
<% end %>

Move wymeditor javascript to after application.
Move wymeditor javascript to after application.

Wymeditor javascripts use functionality included by the
'refinery/application' manifest. Therefore, it must be included
afterwards.

This change in conjunction with my other pull request to
parndt/refinerycms-wymeditor fixes a problem where ajax pagination would
trigger two ajax requests when clicking a page change rather than just
the desired one.

This was because both wymeditor and refinery/application asset pipelines
were including refinery/admin, which then triggered init pagination
twice, which resulted in two identical handlers firing.
