%= form_tag(sort_admin_positionables_path, :method => "post") %>
<%= tag :i, :class => "icon icon-th-list", :"data-toggle" => "tooltip", :title => t('fullstack.admin.drag_to_sort_items', :default => "Drag to sort items") %>
|
<%= t("fullstack.admin.resources.#{@positionable_class.name.underscore.pluralize}", :default => @positionable_class.name.humanize) %> |
<% @positionables.positionables.each do |positionable| %>
<%= image_tag "drag-handle.png", :class => "handle" %>
|
<%= title_for(positionable) %>
|
<% end %>
<%= button t('fullstack.admin.update', :default => "Update"), :class => "btn-primary" %>
<% content_for :javascripts do -%>
<%= javascript_tag do %>
<%= coffee_script do %>
console.log("fasasf")
$(document).ready ->
$('.positionable .sortable').live 'sortupdate', ->
console.log('ok')
$(@).find('input.positionable-position-input').each (i, e) ->
console.log('pos' + i)
$(@).val(i)
<% end %>
<% end %>
<% end -%>