mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-29 13:28:49 +01:00
Merge pull request #101 from dD0T/jqselectanderrors
Thanks for these great fixes. Keep 'm coming :-)
This commit is contained in:
commit
eef7c783df
6 changed files with 18 additions and 11 deletions
|
|
@ -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'],
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -27,5 +27,5 @@ function html_for_empty_form() {
|
|||
}
|
||||
|
||||
function html_for_error_messages() {
|
||||
return "<%= escape_javascript(error_messages_for('recurring_todo')) %>";
|
||||
}
|
||||
return "<%= escape_javascript(get_list_of_error_messages_for(@recurring_todo)) %>";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
<h2><%= t('users.change_authentication_type') %></h2>
|
||||
|
||||
<%= error_messages_for 'user' %>
|
||||
<%= get_list_of_error_messages_for @user %>
|
||||
|
||||
<p><%= t('users.select_authentication_type') %></p>
|
||||
|
||||
|
|
@ -15,4 +15,4 @@
|
|||
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue