mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-17 15:50:13 +01:00
fix #1142 where an action unmarked as complete will not show the [C] or context name. Also fix contexts with " or ' in the name in the multi todos form
This commit is contained in:
parent
e5b4797a86
commit
c6e1760278
4 changed files with 16 additions and 9 deletions
|
|
@ -389,7 +389,10 @@ module TodosHelper
|
|||
(@original_item_was_deferred && @remaining_deferred_or_pending_count == 0 && (@todo.completed? || @tag_was_removed))
|
||||
container_id = "empty-d" if @completed_count && @completed_count == 0 && !@todo.completed?
|
||||
}
|
||||
page.context { container_id = "c#{@original_item_context_id}empty-nd" if @remaining_in_context == 0 }
|
||||
page.context {
|
||||
container_id = "c#{@original_item_context_id}empty-nd" if @remaining_in_context == 0
|
||||
container_id = "empty-d" if @completed_count && @completed_count == 0 && !@todo.completed?
|
||||
}
|
||||
page.todo { container_id = "c#{@original_item_context_id}empty-nd" if @remaining_in_context == 0 }
|
||||
end
|
||||
return container_id.blank? ? "" : "$(\"##{container_id}\").slideDown(100);"
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
<div id="todo_multi_add" style="display:none">
|
||||
<% form_for(todo, :html=> { :id=>'todo-form-multi-new-action', :name=>'todo', :class => 'inline-form' }) do |t| %>
|
||||
<input id="default_project_name_id" name="default_project_name" type="hidden" value="<%=@initial_project_name-%>" />
|
||||
<input id="default_context_name_id" name="default_context_name" type="hidden" value="<%=@initial_context_name-%>" />
|
||||
<input id="default_project_name_id" name="default_project_name" type="hidden" value="<%=h @initial_project_name-%>" />
|
||||
<input id="default_context_name_id" name="default_context_name" type="hidden" value="<%=h @initial_context_name-%>" />
|
||||
|
||||
<div id="multiple_error_status"><%= error_messages_for("item", :object_name => 'action') %></div>
|
||||
|
||||
|
|
@ -11,11 +11,11 @@
|
|||
<%= text_area_tag( "todo[multiple_todos]", "", :cols => 29, :rows => 6, :tabindex => 2) %>
|
||||
|
||||
<label for="todo_project_name"><%= t('shared.project_for_all_actions') %></label>
|
||||
<input id="multi_todo_project_name" name="project_name" autocomplete="off" tabindex="3" size="30" type="text" value="<%= @initial_project_name %>" />
|
||||
<input id="multi_todo_project_name" name="project_name" autocomplete="off" tabindex="3" size="30" type="text" value="<%=h @initial_project_name %>" />
|
||||
<div class="page_name_auto_complete" id="project_list" style="display:none"></div>
|
||||
|
||||
<label for="todo_context_name"><%= t('shared.context_for_all_actions') %></label>
|
||||
<input id="multi_todo_context_name" name="context_name" autocomplete="off" tabindex="4" size="30" type="text" value="<%= @initial_context_name %>" />
|
||||
<input id="multi_todo_context_name" name="context_name" autocomplete="off" tabindex="4" size="30" type="text" value="<%=h @initial_context_name %>" />
|
||||
<div class="page_name_auto_complete" id="context_list" style="display:none"></div>
|
||||
|
||||
<label for="tag_list"><%= t('shared.tags_for_all_actions') %></label>
|
||||
|
|
|
|||
|
|
@ -26,9 +26,9 @@ function set_notification() {
|
|||
|
||||
function clear_form() {
|
||||
$('#todo-form-multi-new-action').clearForm();
|
||||
TracksForm.set_context_name_for_multi_add('<%=@initial_context_name%>');
|
||||
TracksForm.set_project_name_for_multi_add('<%=@initial_project_name%>');
|
||||
TracksForm.set_tag_list_for_multi_add('<%=@default_tags%>');
|
||||
TracksForm.set_context_name_for_multi_add('<%=escape_javascript @initial_context_name%>');
|
||||
TracksForm.set_project_name_for_multi_add('<%=escape_javascript @initial_project_name%>');
|
||||
TracksForm.set_tag_list_for_multi_add('<%=escape_javascript @default_tags%>');
|
||||
$('#todo-form-multi-new-action input:text:first').focus();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -158,7 +158,11 @@ function remove_source_container(next_steps) {
|
|||
}
|
||||
|
||||
function html_for_todo() {
|
||||
return "<%= @saved ? escape_javascript(render(:partial => @todo, :locals => { :parent_container_type => "completed" })) : "" %>";
|
||||
return "<%= @saved ? escape_javascript(render(:partial => @todo, :locals => {
|
||||
:parent_container_type => parent_container_type,
|
||||
:suppress_project => source_view_is(:project),
|
||||
:suppress_context => source_view_is(:context)
|
||||
})) : "" %>";
|
||||
}
|
||||
|
||||
function html_for_recurring_todo() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue