diff --git a/app/controllers/login_controller.rb b/app/controllers/login_controller.rb index c9644244..119f79c3 100644 --- a/app/controllers/login_controller.rb +++ b/app/controllers/login_controller.rb @@ -7,7 +7,7 @@ class LoginController < ApplicationController before_filter :login_optional before_filter :get_current_user - protect_from_forgery :except => :check_expiry + protect_from_forgery :except => [:check_expiry, :login] if ( SITE_CONFIG['authentication_schemes'].include? 'cas') # This will allow the user to view the index page without authentication diff --git a/app/controllers/todos_controller.rb b/app/controllers/todos_controller.rb index 26bbaaf8..d0a558b1 100644 --- a/app/controllers/todos_controller.rb +++ b/app/controllers/todos_controller.rb @@ -107,6 +107,7 @@ class TodosController < ApplicationController end @todo.reload if @saved + @todo_was_created_deferred = @todo.deferred? respond_to do |format| format.html { redirect_to :action => "index" } @@ -415,7 +416,8 @@ class TodosController < ApplicationController @original_item_due = @todo.due @context_id = @todo.context_id @project_id = @todo.project_id - + @todo_was_destroyed_from_deferred_state = @todo.deferred? + # activate successors if they only depend on this todo activated_successor_count = 0 @pending_to_activate = [] diff --git a/app/helpers/todos_helper.rb b/app/helpers/todos_helper.rb index 548219f9..cd59eda1 100644 --- a/app/helpers/todos_helper.rb +++ b/app/helpers/todos_helper.rb @@ -234,7 +234,9 @@ module TodosHelper } page.project { return (@todo.active? && @todo.project && @todo.project.id == @default_project.id) || - (@todo.project.hidden? && @todo.project_hidden?) || @todo.deferred? || @todo.pending? + (@todo.project.hidden? && @todo.project_hidden?) || + ( @todo.deferred? && (@todo.project.id == @default_project.id) ) || + @todo.pending? } end @@ -354,11 +356,11 @@ module TodosHelper source_view do |page| page.project { - return "tickler-empty-nd" if @todo_was_deferred_from_active_state || @todo_was_blocked_from_active_state + return "tickler-empty-nd" if @todo_was_deferred_from_active_state || @todo_was_blocked_from_active_state || @todo_was_destroyed_from_deferred_state || @todo_was_created_deferred return "p#{todo.project_id}empty-nd" } page.tag { - return "tickler-empty-nd" if @todo_was_deferred_from_active_state + return "tickler-empty-nd" if @todo_was_deferred_from_active_state || @todo_was_destroyed_from_deferred_state || @todo_was_created_deferred return "hidden-empty-nd" if @todo.hidden? return "c#{todo.context_id}empty-nd" } @@ -389,7 +391,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);" @@ -402,7 +407,7 @@ module TodosHelper html += step + "({ go: function() {\r\n" end end - html += "}}) " * animation.count + html += "}}) " * animation.size return html + ";" end diff --git a/app/views/layouts/login.html.erb b/app/views/layouts/login.html.erb index 36ebb2fd..d179c304 100644 --- a/app/views/layouts/login.html.erb +++ b/app/views/layouts/login.html.erb @@ -3,7 +3,7 @@ <%= stylesheet_link_tag "scaffold" %> - <%= javascript_include_tag 'jquery-1.5.1.min', 'jquery.cookie' %> + <%= javascript_include_tag 'jquery-1.5.2.min', 'jquery.cookie' %> <%= @page_title -%> diff --git a/app/views/layouts/standard.html.erb b/app/views/layouts/standard.html.erb index 1bb6741d..1294123a 100644 --- a/app/views/layouts/standard.html.erb +++ b/app/views/layouts/standard.html.erb @@ -4,9 +4,9 @@ <%= stylesheet_link_tag 'standard','superfish','niftyCorners', 'jquery-ui-1.8.11.custom', :cache => 'tracks-cached' %> <%= stylesheet_link_tag "print", :media => "print" %> - <%= javascript_include_tag 'jquery-1.5.1.min', 'jquery-ui-1.8.11.custom.min', + <%= javascript_include_tag 'jquery-1.5.2.min', 'jquery-ui-1.8.11.custom.min', 'jquery.truncator','jquery.jeditable.mini', 'jquery.cookie', 'jquery.blockUI', - 'jquery.form','jquery.ui.autocomplete.selectFirst', + 'jquery.form', :cache => 'jquery-cached' %> <%= javascript_tag_for_i18n_datepicker %> <%= javascript_include_tag 'hoverIntent','superfish','application', diff --git a/app/views/preferences/edit.html.erb b/app/views/preferences/edit.html.erb index f21f8761..e871ac9c 100644 --- a/app/views/preferences/edit.html.erb +++ b/app/views/preferences/edit.html.erb @@ -22,7 +22,7 @@ s end - def row_with_select_field(pref_name, collection = [true,false], nowrap_label = false) + def row_with_select_field(pref_name, collection = [ [t('preferences.is_true'),true], [t('preferences.is_false'), false] ], nowrap_label = false) table_row(pref_name, nowrap_label) { select('prefs', pref_name, collection) } end @@ -43,7 +43,7 @@ <%= row_with_select_field("show_project_on_todo_done") %> <% if current_user.is_admin? %> <%= row_with_text_field('admin_email') %> <% end %> - <%= row_with_text_field('staleness_starts', true) %> + <%= row_with_text_field('staleness_starts', false) %> <%= row_with_text_field('show_number_completed') %> <%= row_with_text_field('refresh') %> <%= row_with_select_field("verbose_action_descriptors") %> diff --git a/app/views/todos/_new_multi_todo_form.rhtml b/app/views/todos/_new_multi_todo_form.rhtml index ecffbc0e..36f13e16 100644 --- a/app/views/todos/_new_multi_todo_form.rhtml +++ b/app/views/todos/_new_multi_todo_form.rhtml @@ -2,8 +2,8 @@