fix moving todos from one context to another on tag view

also fix ordening on the collections on the tag view page
This commit is contained in:
Reinier Balt 2008-08-26 16:07:35 +02:00
parent 4ac09ed3ae
commit 4d11e156f4
3 changed files with 25 additions and 16 deletions

View file

@ -1,7 +1,8 @@
<div id="error_status"><%= error_messages_for("todo", :object_name => 'action') %></div>
<%= hidden_field( "todo", "id" ) %>
<%= source_view_tag( @source_view ) %>
<%= hidden_field( "todo", "id" ) -%>
<%= source_view_tag( @source_view ) -%>
<%= "<INPUT TYPE=\"hidden\" name=\"_tag_name\" value=\""+ @tag_name+"\">" unless @tag_name.nil? -%>
<label for="<%= dom_id(@todo, 'description') %>">Description</label>
<%= text_field( "todo", "description", "size" => 30, "tabindex" => 8) %>

View file

@ -6,9 +6,10 @@ if @saved
status_message = 'Added new context / ' + status_message if @new_context_created
page.notify :notice, status_message, 5.0
# #update auto completer arrays for context and project
# update auto completer arrays for context and project
page << "contextAutoCompleter.options.array = #{context_names_for_autocomplete}; contextAutoCompleter.changed = true" if @new_context_created
page << "projectAutoCompleter.options.array = #{project_names_for_autocomplete}; projectAutoCompleter.changed = true" if @new_project_created
if source_view_is_one_of(:todo, :context, :tag)
if @context_changed || @todo.deferred?
page[@todo].remove