rebase to master to include i18n changes and fix merge conflicts

This commit is contained in:
Reinier Balt 2011-01-19 10:13:56 +01:00
parent 7a74025253
commit 97e8602ef9
13 changed files with 43 additions and 34 deletions

View file

@ -124,12 +124,12 @@ class TodosController < ApplicationController
@initial_context_name = params['default_context_name']
@initial_project_name = params['default_project_name']
@default_tags = @todo.project.default_tags unless @todo.project.nil?
@status_message = 'Added new next action'
@status_message += ' to tickler' if @todo.deferred?
@status_message += ' in pending state' if @todo.pending?
@status_message += ' in hidden state' if @todo.hidden?
@status_message = 'Added new project / ' + @status_message if @new_project_created
@status_message = 'Added new context / ' + @status_message if @new_context_created
@status_message = t('todos.added_new_next_action')
@status_message += ' ' + t('todos.to_tickler') if @todo.deferred?
@status_message += ' ' + t('todos.in_pending_state') if @todo.pending?
@status_message += ' ' + t('todos.in_hidden_state') if @todo.hidden?
@status_message = t('todos.added_new_project') + ' / ' + @status_message if @new_project_created
@status_message = t('todos.added_new_context') + ' / ' + @status_message if @new_context_created
end
render :action => 'create'
end
@ -190,6 +190,11 @@ class TodosController < ApplicationController
@saved = false;
@default_tags = current_user.projects.find_by_name(@initial_project_name).default_tags unless @initial_project_name.blank?
end
@status_message = @todos.size > 1 ? t('todos.added_new_next_action_plural') : t('todos.added_new_next_action_singular')
@status_message = t('todos.added_new_project') + ' / ' + @status_message if @new_project_created
@status_message = t('todos.added_new_context') + ' / ' + @status_message if @new_context_created
render :action => 'create_multiple'
end
format.xml do

View file

@ -11,6 +11,10 @@
TracksPages.show_edit_errors(html_for_error_messages());
<% end %>
<% if @saved
# only add these js functions if the project is saved
-%>
function update_project_list_page() {
<% if @state_changed -%>
remove_and_re_add_project();
@ -82,6 +86,9 @@ function html_for_project_settings() {
return "<%= source_view_is(:project) ? escape_javascript(render(:partial => 'project_settings', :object => @project )) : "" %>";
}
<% end # if @saved
-%>
function html_for_error_messages() {
return "<%= escape_javascript(error_messages_for('project')) %>";
}

View file

@ -21,13 +21,7 @@
-%>
function set_notification() {
<%-
status_message = 'Added new next action'
status_message += 's' if @todos.size > 1
status_message = 'Added new project / ' + status_message if @new_project_created
status_message = 'Added new context / ' + status_message if @new_context_created
-%>
TracksPages.page_notify('notice', "<%=status_message%>", 5);
TracksPages.page_notify('notice', "<%=@status_message%>", 5);
}
function clear_form() {

View file

@ -49,10 +49,10 @@ function show_new_todo_if_todo_was_recurring() {
TodoItemsContainer.ensureVisibleWithEffectAppear("<%=item_container_id(@new_recurring_todo)%>");
$('#<%=item_container_id(@new_recurring_todo)%>').append(html_for_new_recurring_todo());
$('#<%= dom_id(@new_recurring_todo, 'line')%>').effect('highlight', {}, 2000 );
TracksPages.page_notify('notice', "Action was deleted. Because this action is recurring, a new action was added", 5);
TracksPages.page_notify('notice', "<%=t('todos.recurring_action_deleted')%>", 5);
<% else -%>
<% if @todo.recurring_todo.todos.active.count == 0 && @new_recurring_todo.nil? -%>
TracksPages.page_notify('notice', "There is no next action after the recurring action you just deleted. The recurrence is completed", 5);
TracksPages.page_notify('notice', "<%=t('todos.completed_recurrence_completed')%>", 5);
<% end -%>
<% end -%>
<% end -%>
@ -75,5 +75,4 @@ function html_for_new_recurring_todo() {
<% end
# if @saved
-%>
>>>>>>> get destroying of actions working
-%>