mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-02 15:28:50 +01:00
make drag&drop todos from/to contexts work again
This commit is contained in:
parent
1ba829e960
commit
9c28bc737c
2 changed files with 2 additions and 1 deletions
|
|
@ -397,7 +397,7 @@ class TodosController < ApplicationController
|
|||
@todo = current_user.todos.find(params[:id])
|
||||
@original_item_context_id = @todo.context_id
|
||||
@original_item = current_user.todos.build(@todo.attributes) # create a (unsaved) copy of the original todo
|
||||
@context = current_user.contexts.find(params[:todo][:context_id])
|
||||
@context = current_user.contexts.find(params[:todo][:context_id].sub! 'c', '')
|
||||
@todo.context = @context
|
||||
@saved = @todo.save
|
||||
|
||||
|
|
|
|||
|
|
@ -118,6 +118,7 @@ module TodosHelper
|
|||
toggle = settings[:collapsible] ? container_toggle("toggle_#{settings[:id]}") : ""
|
||||
"#{toggle} #{settings[:title]} #{settings[:append_descriptor]}".html_safe
|
||||
end
|
||||
header += content_tag(:div, nil, :id =>"c_"+settings[:id]+"_target", :class=>"context_target drop_target")
|
||||
header.html_safe
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue