67 lines
1.7 KiB
Plaintext
67 lines
1.7 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>
|
|
<div class="container-fluid">
|
|
<div class="row-fluid">
|
|
<div class="span4">
|
|
|
|
<ul id="themen" class="sort" >
|
|
<% @themen.each do |thema| %>
|
|
<li id="themen_<%= thema.id %>" class="sort" ><div class="contentbox handle" ><h2><%= thema.title %></h2> </div> <%= link_to edit_thema_path(thema),:remote=>true do %> Edit <% end %> <%= link_to thema_fragen_path(thema),:remote=>true do %> Fragen <% end %></li>
|
|
<% end %>
|
|
</ul>
|
|
<%= link_to new_themengruppe_thema_path(@themengruppe),:remote=>true do %> New Thema <% end %>
|
|
</div>
|
|
<div class="span8">
|
|
<div id="themaview"></div>
|
|
</div>
|
|
<script>
|
|
|
|
$( document ).ready(function(){
|
|
$("#themen").sortable({
|
|
cursor: 'crosshair',
|
|
drag:true,
|
|
handle: '.handle',
|
|
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');
|
|
}
|
|
});
|
|
}
|
|
});
|
|
});
|
|
-->
|