diff --git a/app/assets/javascripts/tracks.js b/app/assets/javascripts/tracks.js index 148db688..36e90ebd 100644 --- a/app/assets/javascripts/tracks.js +++ b/app/assets/javascripts/tracks.js @@ -795,7 +795,7 @@ var ProjectListPage = { /* submit project form after entering new project */ $("form#project_form button.positive").live('click', function (ev) { - submit_with_ajax_and_block_element('form.#project_form', $(this)); + submit_with_ajax_and_block_element('form#project_form', $(this)); return false; }); @@ -881,7 +881,7 @@ var ContextListPage = { /* submit form for new context in sidebar */ $("form#context-form button.positive").live('click', function (ev) { - submit_with_ajax_and_block_element('form.#context-form', $(this)); + submit_with_ajax_and_block_element('form#context-form', $(this)); return false; }); @@ -1020,7 +1020,7 @@ var RecurringTodosPage = { buttons: { create: { text: i18n['common.create'], - click: function() { submit_with_ajax_and_block_element('form.#recurring-todo-form-new-action', $(this).parents(".ui-dialog")); }, + click: function() { submit_with_ajax_and_block_element('form#recurring-todo-form-new-action', $(this).parents(".ui-dialog")); }, }, cancel: { text: i18n['common.cancel'], diff --git a/app/controllers/feedlist_controller.rb b/app/controllers/feedlist_controller.rb index bb069f7e..bd1bad78 100644 --- a/app/controllers/feedlist_controller.rb +++ b/app/controllers/feedlist_controller.rb @@ -20,7 +20,7 @@ class FeedlistController < ApplicationController @hidden_contexts = current_user.contexts.hidden respond_to do |format| - format.html { render :layout => 'application' } + format.html format.m end end diff --git a/app/controllers/stats_controller.rb b/app/controllers/stats_controller.rb index cd9d49e2..97e368fa 100644 --- a/app/controllers/stats_controller.rb +++ b/app/controllers/stats_controller.rb @@ -15,8 +15,6 @@ class StatsController < ApplicationController get_stats_contexts get_stats_projects get_stats_tags - - render :layout => 'application' end def actions_done_last12months_data @@ -181,7 +179,7 @@ class StatsController < ApplicationController @actions_open_per_week_array = convert_to_weeks_running_from_today_array(@actions_started, @max_weeks+1) @actions_open_per_week_array = cut_off_array(@actions_open_per_week_array, @count) - @max_actions = @actions_open_per_week_array.max + @max_actions = (@actions_open_per_week_array.max or 0) render :layout => false end diff --git a/app/helpers/recurring_todos_helper.rb b/app/helpers/recurring_todos_helper.rb index ce78a1a8..d8a4c19a 100644 --- a/app/helpers/recurring_todos_helper.rb +++ b/app/helpers/recurring_todos_helper.rb @@ -44,4 +44,13 @@ module RecurringTodosHelper def image_tag_for_edit(todo) image_tag("blank.png", :title =>t('todos.edit_action'), :class=>"edit_item", :id=> dom_id(todo, 'edit_icon')) end + + def get_list_of_error_messages_for(model) + if model.errors.any? + content_tag(:ul) do + model.errors.full_messages.collect { |msg| concat(content_tag(:li, msg)) } + end + end + end + end diff --git a/app/views/recurring_todos/create.js.erb b/app/views/recurring_todos/create.js.erb index 29fa9e32..feab7876 100644 --- a/app/views/recurring_todos/create.js.erb +++ b/app/views/recurring_todos/create.js.erb @@ -27,5 +27,5 @@ function html_for_empty_form() { } function html_for_error_messages() { - return "<%= escape_javascript(error_messages_for('recurring_todo')) %>"; -} \ No newline at end of file + return "<%= escape_javascript(get_list_of_error_messages_for(@recurring_todo)) %>"; +} diff --git a/app/views/users/change_auth_type.html.erb b/app/views/users/change_auth_type.html.erb index 4d9782fd..048d386a 100644 --- a/app/views/users/change_auth_type.html.erb +++ b/app/views/users/change_auth_type.html.erb @@ -2,7 +2,7 @@
<%= t('users.select_authentication_type') %>
@@ -15,4 +15,4 @@ <% end %> - \ No newline at end of file +