Files
fetsite/app/views/themengruppen/verwalten.html.erb
Andreas Stephanides bb8f427f95 themengruppeverwalten
2014-02-09 21:42:46 +01:00

58 lines
1.3 KiB
Plaintext

<style>
#themen { list-style-type: none; margin: 0; padding: 0; margin-bottom: 15px;zoom: 1; }
#themen li { margin: 0 5px 5px 5px; padding: 5px; font-size: 1.2em; width: 95%; }
</style>
<ul id="themen" class="sort" >
<% @themen.each do |thema| %>
<li id="themen_<%= thema.id %>" class="sort" ><div class="contentbox" ><h2><%= thema.title %></h2> </div></li>
<% end %>
</ul>
<script>
$( document ).ready(function(){
$("#themen").sortable({
cursor: 'crosshair',
drag:true,
update: function(){
$.ajax({
url: '<%= themengruppe_sort_themen_path(@themengruppe) %>',
type: 'post',
data: $('#themen').sortable('serialize'),
handle: ".contentbox",
dataType: 'script',
complete: function(request){
}
})
}
});
});
</script>
<!--
$( document ).ready(function(){
$("#themen").sortable({
axis: 'y',
drag:true,
dropOnEmpty: false,
handle: '.handle',
cursor: 'crosshair',
items: 'li',
opacity: 0.4,
scroll: true,
update: function(){
$.ajax({
url: '/books/sort',
type: 'post',
data: $('#themen').sortable('serialize'),
dataType: 'script',
complete: function(request){
$('#themen').effect('highlight');
}
});
}
});
});
-->