Sha256: 2828e844e26a748b988b4fee9fe4ebfdb0220eb88e1b6421ec91e074c5c92f2d

Contents?: true

Size: 727 Bytes

Versions: 5

Compression:

Stored size: 727 Bytes

Contents

<h1><%= t('categories.sort.title') %></h1>

<ul id="categories">
  <% for category in @categories %>
  <li id="category-<%= category.id %>"><span class='handle'>[drag]</span><%= category.name %></li>
  <% end %>
</ul>

<p>
  <%= link_to t('categories.sort.stop_sorting'), admin_categories_path %>
</p>


<% content_for (:head) do %>
<script type="text/javascript">
  $(function() {
    
    $('ul').sortable({items:'li',
      axis: 'y',
      dropOnEmpty: false,
      complete: function(request){$('ul').effect('highlight');},
      update: function() {
        $.post("<%= sorting_admin_categories_path %>", '_method=get'+'&'+$(this).sortable('serialize'));
    }}).disableSelection();
    
  });
  
</script>  
<% end %>  

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
merrycms-0.1.7 app/views/admin/categories/sort.html.erb
merrycms-0.1.4 app/views/admin/categories/sort.html.erb
merrycms-0.1.2 app/views/admin/categories/sort.html.erb
merrycms-0.1.1 app/views/admin/categories/sort.html.erb
merrycms-0.1.0 app/views/admin/categories/sort.html.erb