mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-30 20:55:17 +01:00
Fixes #135 (projects page incorrectly referring to context page for Sortable drag and drop code, so changes to project sort order were not sticking after a refresh.
Fixed #142 - the 500 error was being generated on dragging projects and contexts to reorder because the order method was looking for an order view and layout. I've added a :render => nothing statement to order now,and that seems to fix the error. git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@158 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
parent
f39ebf6ec9
commit
a948beefee
3 changed files with 4 additions and 2 deletions
|
|
@ -80,6 +80,7 @@ class ContextController < ApplicationController
|
|||
Context.update(id, :position => position + 1)
|
||||
end
|
||||
end
|
||||
render :nothing => true
|
||||
end
|
||||
|
||||
protected
|
||||
|
|
|
|||
|
|
@ -77,6 +77,7 @@ class ProjectController < ApplicationController
|
|||
Project.update(id, :position => position + 1)
|
||||
end
|
||||
end
|
||||
render :nothing => true
|
||||
end
|
||||
|
||||
protected
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@
|
|||
<% sortable_options = {
|
||||
:tag => 'div',
|
||||
:handle => 'handle',
|
||||
:complete => visual_effect(:highlight, 'list-contexts'),
|
||||
:url => {:controller => 'context', :action => 'order'}
|
||||
:complete => visual_effect(:highlight, 'list-projects'),
|
||||
:url => {:controller => 'project', :action => 'order'}
|
||||
}%>
|
||||
<%= sortable_element 'list-projects', sortable_options %>
|
||||
<br />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue