Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'master' of github.com:TracksApp/tracks

  • Loading branch information...
commit 9421ae76bb2ae0e11142dcea835380ff0ff47c4c 2 parents 05695c1 + 0a7c19a
@lrbalt lrbalt authored
View
3  app/assets/javascripts/tracks.js
@@ -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
2  app/assets/stylesheets/mobile.css
@@ -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
6 app/controllers/todos_controller.rb
@@ -1269,8 +1269,8 @@ def update_context
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 @@ def context_id
end
def tag_list
- @params['todo_tag_list']
+ @params['tag_list']
end
def predecessor_list
View
2  app/models/recurring_todo.rb
@@ -411,7 +411,7 @@ def recurrence_pattern
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
4 app/views/todos/_edit_form.html.erb
@@ -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
4 app/views/todos/_edit_form.m.erb
@@ -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
4 app/views/todos/_new_todo_form.html.erb
@@ -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">
View
8 features/step_definitions/todo_create_steps.rb
@@ -215,7 +215,7 @@
When /^I submit a new action with description "([^"]*)" and the tags "([^"]*)" in the context "([^"]*)"$/ do |description, tags, context_name|
fill_in "todo[description]", :with => description
- fill_in "todo_tag_list", :with => tags
+ fill_in "tag_list", :with => tags
# fill_in does not seem to work when the field is prefilled with something. Empty the field first
clear_context_name_from_next_action_form
@@ -231,7 +231,7 @@
fill_in "todo_project_name", :with => project_name
fill_in "todo_context_name", :with => context_name
- fill_in "todo_tag_list", :with => tags
+ fill_in "tag_list", :with => tags
submit_next_action_form
end
@@ -263,7 +263,7 @@
clear_context_name_from_next_action_form
fill_in "todo_context_name", :with => context_name
- fill_in "todo_tag_list", :with => tags
+ fill_in "tag_list", :with => tags
fill_in "todo[show_from]", :with => format_date(@current_user.time + 1.week)
submit_next_action_form
end
@@ -276,7 +276,7 @@
fill_in "todo_project_name", :with => project_name
fill_in "todo_context_name", :with => context_name
- fill_in "todo_tag_list", :with => tags
+ fill_in "tag_list", :with => tags
fill_in "todo[show_from]", :with => format_date(@current_user.time + 1.week)
submit_next_action_form
View
6 features/step_definitions/todo_steps.rb
@@ -122,12 +122,12 @@
end
Then /^the tag field in the new todo form should be empty$/ do
- xpath= "//form[@id='todo-form-new-action']/input[@id='todo_tag_list']"
+ xpath= "//form[@id='todo-form-new-action']/input[@id='tag_list']"
page.find(:xpath, xpath).value.blank?.should be_true
end
Then /^the tag field in the new todo form should be "([^"]*)"$/ do |tag_list|
- xpath= "//form[@id='todo-form-new-action']/input[@id='todo_tag_list']"
+ xpath= "//form[@id='todo-form-new-action']/input[@id='tag_list']"
tag_list.should == page.find(:xpath, xpath).value
end
@@ -161,4 +161,4 @@
todo.should_not be_nil
page.find("div#notes_todo_#{todo.id}").send(visible=="see" ? "should" : "should_not", be_visible)
-end
+end
View
4 test/functional/todos_controller_test.rb
@@ -49,7 +49,7 @@ def test_tagging_changes_to_tag_with_numbers
assert_difference 'Todo.count' do
put :create, :_source_view => 'todo', "context_name"=>"library", "project_name"=>"Build a working time machine", "todo"=>{
"notes"=>"", "description"=>"test tags", "due"=>"30/11/2006"},
- "todo_tag_list"=>"1234,5667,9876"
+ "tag_list"=>"1234,5667,9876"
# default has_many_polymorphs will fail on these high numbers as tags with those id's do not exist
end
t = assigns['todo']
@@ -63,7 +63,7 @@ def test_tagging_changes_to_handle_empty_tags
assert_difference 'Todo.count' do
put :create, :_source_view => 'todo', "context_name"=>"library", "project_name"=>"Build a working time machine", "todo"=>{
"notes"=>"", "description"=>"test tags", "due"=>"30/11/2006"},
- "todo_tag_list"=>"a,,b"
+ "tag_list"=>"a,,b"
# default has_many_polymorphs will fail on the empty tag
end
t = assigns['todo']
View
4 test/unit/todo_create_params_helper_test.rb
@@ -34,7 +34,7 @@ def test_due_accessor
end
def test_tag_list_accessor
- params = { 'todo' => { }, 'todo_tag_list' => 'foo, bar'}
+ params = { 'todo' => { }, 'tag_list' => 'foo, bar'}
prefs = users(:admin_user).prefs
params_helper = TodosController::TodoCreateParamsHelper.new(params, prefs)
assert_equal('foo, bar', params_helper.tag_list)
@@ -133,4 +133,4 @@ def test_context_specified_by_name_is_false_when_context_name_is_blank
assert_equal false, params_helper.context_specified_by_name?
end
-end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.