diff --git a/config/locales/en.yml b/config/locales/en.yml
index ac2e0f3d..28c1e8f6 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -38,6 +38,7 @@ en:
update: "Update"
logout: "Logout"
cancel: "Cancel"
+ ok: "Ok"
project: "Project"
projects: "Projects"
context: "Context"
@@ -55,12 +56,15 @@ en:
description: "Description"
notes: "Notes"
optional: "optional"
+ ajaxError: 'There was an error retrieving from server'
sort:
sort: "Sort"
alphabetically: "Alphabetically"
alphabetically_title: "Sort projects alphabetically"
+ alphabetically_confirm: "Are you sure that you want to sort these projects alphabetically? This will replace the existing sort order."
by_task_count: "By number of tasks"
by_task_count_title: "Sort by number of tasks"
+ by_task_count_title_confirm: "Are you sure that you want to sort these projects by the number of tasks? This will replace the existing sort order."
drag_handle: "DRAG"
contexts:
status_hidden: "Context is hidden"
@@ -73,14 +77,19 @@ en:
add_context: "Add Context"
context_hide: "Hide from front page?"
hide_form: "Hide form"
+ hide_form_title: "Hide new context form"
+ show_form: "Create a new context"
+ show_form_title: "Add a context"
visible_contexts: "Visible contexts"
hidden_contexts: "Hidden contexts"
context_deleted: "Deleted context '%{name}'"
no_contexts_hidden: "Currently there are no hidden contexts"
no_contexts_active: "Currently there are no active contexts"
- hide_form_link_title: "Hide new context form"
delete_context: "Delete context"
+ delete_context_title: "Delete context"
delete_context_confirmation: "Are you sure that you want to delete the context '%{name}'? Be aware that this will also delete all (repeating) actions in this context!"
+ new_context_pre: "New context '"
+ new_context_post: "' will be also created. Are you sure?"
edit_context: "Edit context"
data:
import_errors: "Some errors occurred during import"
@@ -194,6 +203,8 @@ en:
delete_item_title: "Delete item"
show_note_title: "Show note"
deleted_note: "Deleted note '%{id}'"
+ delete_note_title: "Delete the note '%{id}'"
+ delete_note_confirm: "Are you sure that you want to delete the note '%{id}'?"
no_notes_available: "Currently there are no notes: add notes to projects from individual project pages."
preferences:
title: "Your preferences"
@@ -241,11 +252,14 @@ en:
default_context: "The default context for this project is %{context}"
project_state: "Project is %{state}."
no_projects: "Currently there are no projects"
- hide_new_project_form: "Hide new project form"
+ hide_form_title: "Hide new project form"
hide_form: "Hide form"
+ show_form_title: "Create a new project"
+ show_form: "Add a project"
add_project: "Add Project"
to_new_project_page: "Take me to the new project page"
- delete_project_title: "delete the project"
+ delete_project_title: "Delete the project"
+ delete_project_confirmation: "Are you sure that you want to delete the project '%{name}'?"
delete_project: "Delete project"
edit_project_title: "Edit project"
states:
@@ -269,6 +283,8 @@ en:
hide_form: "Hide form"
toggle_multi_title: "Toggle single/multi new action form"
toggle_multi: "Add multiple next actions"
+ toggle_single: 'Add a next action'
+ toggle_single_title: 'Add a new next action'
separate_tags_with_commas: "separate with commas"
add_action: "Add action"
multiple_next_actions: "Multiple next actions (one on each line)"
@@ -429,7 +445,8 @@ en:
show_option_always: "always"
show_days_before: "%{days} days before the todo is due"
from_tickler: "the date todo comes from tickler (no due date set)"
- delete_recurring_action: "delete the recurring action '%{description}'"
+ delete_recurring_action_confirm: "Are you sure that you want to delete the recurring action '%{description}'?"
+ delete_recurring_action_title: "Delete the recurring action"
star_action_with_description: "star the action '%{description}'"
star_action: "Star this action"
delete_action: "Delete action"
diff --git a/features/context_list.feature b/features/context_list.feature
index eef1fe1e..a1c3afa8 100644
--- a/features/context_list.feature
+++ b/features/context_list.feature
@@ -80,3 +80,12 @@ Feature: Manage the list of contexts
Scenario: I can drag and drop to order the contexts
# TODO: pending scenario
Given this is a pending scenario
+
+ @selenium @wip
+ Scenario: Hiding and unhiding the new project form
+ When I go to the contexts page
+ Then the new context form should be visible
+ When I follow "Hide form"
+ Then the new context form should not be visible
+ When I follow "Create a new context"
+ Then the new context form should be visible
diff --git a/features/edit_a_todo.feature b/features/edit_a_todo.feature
index ddfb5df2..96b657a4 100644
--- a/features/edit_a_todo.feature
+++ b/features/edit_a_todo.feature
@@ -12,8 +12,13 @@ Feature: Edit a next action from every page
Scenario: I can toggle the star of a todo
Given this is a pending scenario
+ @selenium @wip
Scenario: I can delete a todo
- Given this is a pending scenario
+ Given I have a todo with description "delete me" in the context "@home"
+ When I go to the home page
+ Then I should see "delete me"
+ And I delete the todo
+ Then I should not see "delete me"
Scenario: Removing the last todo in context will hide context # delete, edit
Given this is a pending scenario
diff --git a/features/project_list.feature b/features/project_list.feature
index 397b0d4f..e682797b 100644
--- a/features/project_list.feature
+++ b/features/project_list.feature
@@ -72,9 +72,9 @@ Feature: Manage the list of projects
Scenario: Hiding and unhiding the new project form
When I go to the projects page
Then the new project form should be visible
- When I follow "« Hide form"
+ When I follow "Hide form"
Then the new project form should not be visible
- When I follow "Create a new project »"
+ When I follow "Create a new project"
Then the new project form should be visible
@selenium
diff --git a/features/shared_add_new_todo.feature b/features/shared_add_new_todo.feature
index 0d7a8438..99caa94d 100644
--- a/features/shared_add_new_todo.feature
+++ b/features/shared_add_new_todo.feature
@@ -15,7 +15,7 @@ Feature: Add new next action from every page
Scenario Outline: I can hide the input form for single next action on a page
When I the
Then the single action form should be visible
- When I follow "« Hide form"
+ When I follow "Hide form"
Then the single action form should not be visible
Scenarios:
@@ -32,7 +32,7 @@ Feature: Add new next action from every page
Then the single action form should be visible
When I follow "Add multiple next actions"
Then the multiple action form should be visible
- When I follow "« Hide form"
+ When I follow "Hide form"
Then the single action form should not be visible
And the multiple action form should not be visible
@@ -48,11 +48,11 @@ Feature: Add new next action from every page
Scenario Outline: I can hide the input form and then choose both input forms
When I the
Then the single action form should be visible
- When I follow "« Hide form"
+ When I follow "Hide form"
Then the single action form should not be visible
When I follow "Add multiple next actions"
Then the multiple action form should be visible
- When I follow "« Hide form"
+ When I follow "Hide form"
Then the single action form should not be visible
And the multiple action form should not be visible
@@ -71,7 +71,7 @@ Feature: Add new next action from every page
When I follow "Add multiple next actions"
Then the single action form should not be visible
And the multiple action form should be visible
- When I follow "Add single next action"
+ When I follow "Add a next action"
Then the single action form should be visible
And the multiple action form should not be visible
diff --git a/features/step_definitions/context_steps.rb b/features/step_definitions/context_steps.rb
index c73ad3bf..5a7dfbfa 100644
--- a/features/step_definitions/context_steps.rb
+++ b/features/step_definitions/context_steps.rb
@@ -61,7 +61,7 @@ end
When /^I edit the context name in place to be "([^\"]*)"$/ do |new_context_name|
selenium.click "context_name"
fill_in "value", :with => new_context_name
- click_button "OK"
+ click_button "Ok"
end
Then /^I should see the context name is "([^\"]*)"$/ do |context_name|
diff --git a/features/step_definitions/project_steps.rb b/features/step_definitions/project_steps.rb
index 49999645..b01ce894 100644
--- a/features/step_definitions/project_steps.rb
+++ b/features/step_definitions/project_steps.rb
@@ -104,7 +104,7 @@ end
When /^I edit the project name in place to be "([^"]*)"$/ do |new_project_name|
selenium.click "project_name"
fill_in "value", :with => new_project_name
- click_button "OK"
+ click_button "Ok"
end
When /^I edit the project state of "([^"]*)" to "([^"]*)"$/ do |project_name, state_name|
diff --git a/features/step_definitions/todo_steps.rb b/features/step_definitions/todo_steps.rb
index aad984e0..a848fad8 100644
--- a/features/step_definitions/todo_steps.rb
+++ b/features/step_definitions/todo_steps.rb
@@ -243,7 +243,7 @@ Then /^the container for the context "([^"]*)" should not be visible$/ do |conte
end
Then /^a confirmation for adding a new context "([^"]*)" should be asked$/ do |context_name|
- selenium.get_confirmation.should == "New context \"#{context_name}\" will be also created. Are you sure?"
+ selenium.get_confirmation.should == "New context '#{context_name}' will be also created. Are you sure?"
end
Then /^I should see "([^"]*)" in the deferred container$/ do |todo_description|
diff --git a/public/javascripts/application.js b/public/javascripts/application.js
index 24ba3393..82d6575e 100644
--- a/public/javascripts/application.js
+++ b/public/javascripts/application.js
@@ -8,7 +8,7 @@ var TracksForm = {
toggleLink.text(showLinkText).attr('title', showLinkTitle);
}
else {
- toggleLidefault_ajax_optionsnk.text(hideLinkText).attr('title', hideLinkTitle);
+ toggleLink.text(hideLinkText).attr('title', hideLinkTitle);
$('#'+formId+' input:text:first').focus();
}
toggleLink.parent().toggleClass('hide_form');
@@ -46,12 +46,12 @@ var TracksForm = {
if ($("#todo_multi_add").is(':visible')) { /* hide multi next action form first */
$('#todo_new_action').show();
$('#todo_multi_add').hide();
- $('a#toggle_multi').text("Add multiple next actions");
+ $('a#toggle_multi').text(i18n['shared.toggle_multi']);
}
TracksForm.toggle('toggle_action_new', 'todo_new_action', 'todo-form-new-action',
- '« Hide form', 'Hide next action form',
- 'Add a next action »', 'Add a next action');
+ i18n['shared.hide_form'], i18n['shared.hide_action_form_title'],
+ i18n['shared.toggle_single'], i18n['shared.toggle_single_title']);
});
/* toggle new todo form for multi edit */
@@ -59,13 +59,13 @@ var TracksForm = {
if ($("#todo_multi_add").is(':visible')) {
$('#todo_new_action').show();
$('#todo_multi_add').hide();
- $('a#toggle_multi').text("Add multiple next actions");
+ $('a#toggle_multi').text(i18n['shared.toggle_multi']);
}
else {
$('#todo_new_action').hide();
$('#todo_multi_add').show();
- $('a#toggle_multi').text("Add single next action");
- $('a#toggle_action_new').text('« Hide form');
+ $('a#toggle_multi').text(i18n['shared.toggle_single']);
+ $('a#toggle_action_new').text(i18n['shared.hide_form']);
}
});
@@ -74,14 +74,15 @@ var TracksForm = {
$(this).prev().val('');
});
- /* behavior for delete icon */
+ /* behavior for delete icon. DEAD CODE??? */
$('.item-container a.delete_icon').live('click', function(evt){
evt.preventDefault();
params = {};
if(typeof(TAG_NAME) !== 'undefined'){
params._tag_name = TAG_NAME;
}
- if(confirm("Are you sure that you want to "+this.title+"?")){
+ confirm_message = $(this).attr("x_confirm_message")
+ if(confirm(confirm_message)){
itemContainer = $(this).parents(".item-container");
itemContainer.block({
message: null
@@ -93,7 +94,7 @@ var TracksForm = {
}
});
- /* behavior for edit icon */
+ /* behavior for edit icon DEAD CODE???*/
$('.item-container a.edit_icon').live('click', function(evt){
evt.preventDefault();
params = {};
@@ -318,7 +319,7 @@ var TodoItems = {
for (i=0; i