Merge pull request #82 from maddentim/fixes

Some fixes
This commit is contained in:
Reinier Balt 2012-06-27 14:46:11 -07:00
commit 0a7c19ab39
11 changed files with 23 additions and 24 deletions

View file

@ -35,7 +35,7 @@ var TracksForm = {
$('#project_name').html(name);
},
set_tag_list: function (name) {
$('input#todo_tag_list').val(name);
$('input#tag_list').val(name);
},
set_tag_list_for_multi_add: function (name) {
$('#multi_tag_list').val(name);
@ -252,7 +252,6 @@ var TracksPages = {
ContextItems.setup_autocomplete_for_contexts('input[name=context_name]');
ContextItems.setup_autocomplete_for_contexts('input[id="project_default_context_name"]');
TracksPages.setup_autocomplete_for_tag_list('input[name=tag_list]'); // todo edit form
TracksPages.setup_autocomplete_for_tag_list('input[name=todo_tag_list]'); // new todo form
TracksPages.setup_autocomplete_for_tag_list('input[id="project_default_tags"]');
TodoItems.setup_autocomplete_for_predecessor();
},

View file

@ -230,7 +230,7 @@ table.c {
display:inline;
}
input#todo_description, input#todo_tag_list, textarea#todo_notes, select#todo_project_id, select#todo_context_id {
input#todo_description, input#tag_list, textarea#todo_notes, select#todo_project_id, select#todo_context_id {
width: 95%;
}

View file

@ -1269,8 +1269,8 @@ class TodosController < ApplicationController
end
def update_tags
if params[:todo_tag_list]
@todo.tag_with(params[:todo_tag_list])
if params[:tag_list]
@todo.tag_with(params[:tag_list])
@todo.tags(true) #force a reload for proper rendering
end
end
@ -1423,7 +1423,7 @@ class TodosController < ApplicationController
end
def tag_list
@params['todo_tag_list']
@params['tag_list']
end
def predecessor_list

View file

@ -411,7 +411,7 @@ class RecurringTodo < ActiveRecord::Base
return I18n.t("todos.recurrence.pattern.on_work_days")
else
if every_other1 > 1
return I18n.t("todos.recurrence.pattern.every_n", :n => every_other1) + " " + I18n.t("common.days")
return I18n.t("todos.recurrence.pattern.every_n", :n => every_other1) + " " + I18n.t("common.days_midsentence.other")
else
return I18n.t("todos.recurrence.pattern.every_day")
end

View file

@ -30,8 +30,8 @@
<input id="<%= dom_id(@todo, 'context_name') %>" name="context_name" autocomplete="off" tabindex="<%= next_tab_index%>" size="30" type="text" value="<%= h @todo.context.name %>" />
</div>
<label class="tag_list_label" for="<%= dom_id(@todo, 'todo_tag_list') %>"><%= t('todos.tags') %></label>
<%= text_field_tag 'todo_tag_list', tag_list_text, :id => dom_id(@todo, 'todo_tag_list'), :size => 30, :tabindex => next_tab_index %>
<label class="tag_list_label" for="<%= dom_id(@todo, 'tag_list') %>"><%= t('todos.tags') %></label>
<%= text_field_tag 'tag_list', tag_list_text, :id => dom_id(@todo, 'tag_list'), :size => 30, :tabindex => next_tab_index %>
<div class="due_input">
<label for="<%= dom_id(@todo, 'due_label') %>"><%= Todo.human_attribute_name('due') %></label>

View file

@ -6,8 +6,8 @@
<% this_year = current_user.time.to_date.strftime("%Y").to_i -%>
<h2><label for="todo_description"><%= t('common.description') %></label></h2>
<%= text_field( "todo", "description", "tabindex" => 1, "maxlength" => 100, "size" => 50) %>
<h2><label for="todo_tag_list"><%= t('todos.tags') %></label></h2>
<%= text_field_tag "todo_tag_list", @tag_list_text, :size => 50, :tabindex => 2 %>
<h2><label for="tag_list"><%= t('todos.tags') %></label></h2>
<%= text_field_tag "tag_list", @tag_list_text, :size => 50, :tabindex => 2 %>
<h2><label for="todo_context_id"><%= t('common.context') %></label></h2>
<%= unless @mobile_from_context
collection_select( "todo", "context_id", @contexts, "id", "name", {}, {"tabindex" => 3} )

View file

@ -30,9 +30,9 @@
<label for="todo_context_name"><%= Todo.human_attribute_name('context') %></label>
<input id="todo_context_name" name="context_name" autocomplete="off" tabindex="<%= next_tab_index%>" size="30" type="text" value="<%= h(@initial_context_name) %>" />
<label for="todo_tag_list"><%= Todo.human_attribute_name('tags') + ' (' + t('shared.separate_tags_with_commas') + ')' %></label>
<label for="tag_list"><%= Todo.human_attribute_name('tags') + ' (' + t('shared.separate_tags_with_commas') + ')' %></label>
<%= hidden_field_tag "initial_tag_list", @initial_tags%>
<%= text_field_tag "todo_tag_list", @initial_tags, :size => 30, :tabindex => next_tab_index %>
<%= text_field_tag "tag_list", @initial_tags, :size => 30, :tabindex => next_tab_index %>
<%= content_tag("div", "", :id => "tag_list_auto_complete", :class => "auto_complete") %>
<div class="due_input">