Created
February 28, 2013 03:56
-
-
Save gtcarlos/5054048 to your computer and use it in GitHub Desktop.
Tabelas
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
</html> | |
<head> | |
<title>Administrador de Aplicação</title> | |
</head> | |
<body> | |
<div id=title><h1>Administrador de Aplicação</h1></div> | |
<table title="Estados"> | |
<thead> | |
<tr> | |
<th>Nome</th> | |
<th>Sigla</th> | |
</tr> | |
</thead> | |
<tbody id="estados" data-update-url="<%= aplicacao_sort_url %>"> | |
<% @estados.each do |estado| %> | |
<tr> | |
<%= content_tag_for(:td, estado) do %> | |
<%= estado.nome %> | |
<% end %> | |
<%= content_tag_for(:td, estado) do %> | |
<%= estado.sigla %> | |
<% end %> | |
</tr> | |
<% end %> | |
</tbody> | |
</table> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery -> | |
$('#estados').sortable( | |
axis: 'y' | |
update: -> | |
$.post($(this).data('update-url'), $(this).sortable('serialize')) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment