summaryrefslogtreecommitdiffstats
path: root/app/views/custom_fields
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-04-17 07:40:39 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-04-17 07:40:39 +0000
commit42b5c332b2c24c8dcc2581e0cd130ef930959d99 (patch)
tree3ddade3fa50427138419d48c57b20d93ac960048 /app/views/custom_fields
parent64afa24a7f72526a2cbf6761e51b6cd326aa0c36 (diff)
downloadredmine-42b5c332b2c24c8dcc2581e0cd130ef930959d99.tar.gz
redmine-42b5c332b2c24c8dcc2581e0cd130ef930959d99.zip
Lists can be reordered with drag and drop (#12909).
git-svn-id: http://svn.redmine.org/redmine/trunk@15336 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/custom_fields')
-rw-r--r--app/views/custom_fields/_index.html.erb5
-rw-r--r--app/views/custom_fields/index.html.erb4
2 files changed, 6 insertions, 3 deletions
diff --git a/app/views/custom_fields/_index.html.erb b/app/views/custom_fields/_index.html.erb
index b0d3c277b..7a5d37283 100644
--- a/app/views/custom_fields/_index.html.erb
+++ b/app/views/custom_fields/_index.html.erb
@@ -1,4 +1,4 @@
-<table class="list">
+<table class="list custom_fields">
<thead><tr>
<th><%=l(:field_name)%></th>
<th><%=l(:field_field_format)%></th>
@@ -7,7 +7,6 @@
<th><%=l(:field_is_for_all)%></th>
<th><%=l(:label_used_by)%></th>
<% end %>
- <th><%=l(:button_sort)%></th>
<th></th>
</tr></thead>
<tbody>
@@ -21,8 +20,8 @@
<td><%= checked_image custom_field.is_for_all? %></td>
<td><%= l(:label_x_projects, :count => custom_field.projects.count) if custom_field.is_a? IssueCustomField and !custom_field.is_for_all? %></td>
<% end %>
- <td class="reorder"><%= reorder_links('custom_field', {:action => 'update', :id => custom_field, :back_url => back_url}, :put) %></td>
<td class="buttons">
+ <%= reorder_handle(custom_field, :url => custom_field_path(custom_field), :param => 'custom_field') %>
<%= delete_link custom_field_path(custom_field) %>
</td>
</tr>
diff --git a/app/views/custom_fields/index.html.erb b/app/views/custom_fields/index.html.erb
index e4464132f..cf2193db5 100644
--- a/app/views/custom_fields/index.html.erb
+++ b/app/views/custom_fields/index.html.erb
@@ -9,3 +9,7 @@
<% else %>
<p class="nodata"><%= l(:label_no_data) %></p>
<% end %>
+
+<%= javascript_tag do %>
+ $(function() { $("table.custom_fields tbody").positionedItems(); });
+<% end %> \ No newline at end of file