forked from bofh/fetsite
themen verwalten add
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
</p>
|
||||
|
||||
<div class="accordion" id="accordion1">
|
||||
<% @themengruppe.themen.each do |thema| %>
|
||||
<% @themen.each do |thema| %>
|
||||
<div class="accordion-group">
|
||||
<div class="accordion-heading">
|
||||
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion1" href="#collapse<%=thema.id%>">
|
||||
|
||||
1
app/views/themengruppen/sort_themen.js.erb
Normal file
1
app/views/themengruppen/sort_themen.js.erb
Normal file
@@ -0,0 +1 @@
|
||||
alert('sd<%= escape_javascript(@params['themen'].to_s) %>');
|
||||
1
app/views/themengruppen/sort_themengruppen.js.erb
Normal file
1
app/views/themengruppen/sort_themengruppen.js.erb
Normal file
@@ -0,0 +1 @@
|
||||
alert("tt")
|
||||
56
app/views/themengruppen/verwalten.html.erb
Normal file
56
app/views/themengruppen/verwalten.html.erb
Normal file
@@ -0,0 +1,56 @@
|
||||
<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" style="background:white;display:block;" ><%= thema.title %>-<%= thema.priority %></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'),
|
||||
dataType: 'script',
|
||||
complete: function(request){
|
||||
alert("complete");
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
});
|
||||
</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');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
-->
|
||||
@@ -4,7 +4,7 @@
|
||||
<%= @themengruppe.text %>
|
||||
</p>
|
||||
<ul class="unstyled linkbox-list" >
|
||||
<% @themengruppe.themen.each do |thema| %>
|
||||
<% @themen.each do |thema| %>
|
||||
<li>
|
||||
<div class="contentbox">
|
||||
<a href="#<%=thema.id%>">
|
||||
|
||||
27
app/views/themes/2003/themengruppen/verwalten_all.html.erb
Normal file
27
app/views/themes/2003/themengruppen/verwalten_all.html.erb
Normal file
@@ -0,0 +1,27 @@
|
||||
|
||||
<ul id="themengruppen" class="sort" >
|
||||
<% @themengruppen.each do |themengruppe| %>
|
||||
<li id="themengruppen_<%= themengruppe.id %>" class="sort" style="background:white;display:block;" ><%= themengruppe.title %>-<%= themengruppe.priority %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
<script>
|
||||
|
||||
$( document ).ready(function(){
|
||||
$("#themengruppen").sortable({
|
||||
cursor: 'crosshair',
|
||||
drag:true,
|
||||
update: function(){
|
||||
$.ajax({
|
||||
url: '<%= sort_themengruppen_themengruppen_path() %>',
|
||||
type: 'post',
|
||||
data: $('#themengruppen').sortable('serialize'),
|
||||
dataType: 'script',
|
||||
complete: function(request){
|
||||
alert("complete");
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user