From ff046c826de9b8e26af44d1624089694c4f9a5b8 Mon Sep 17 00:00:00 2001 From: Hagen Schink Date: Mon, 28 Apr 2014 11:10:21 +0200 Subject: [PATCH] Prevent page reload on time/column selection --- app/views/time_entries/reports/show.html.erb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/views/time_entries/reports/show.html.erb b/app/views/time_entries/reports/show.html.erb index d2afd8f575..23006d9749 100644 --- a/app/views/time_entries/reports/show.html.erb +++ b/app/views/time_entries/reports/show.html.erb @@ -51,14 +51,13 @@ See doc/COPYRIGHT.rdoc for more details. : <%= select_tag 'columns', options_for_select([[l(:label_year), 'year'], [l(:label_month), 'month'], [l(:label_week), 'week'], - [l(:label_day_plural).titleize, 'day']], @columns), - :onchange => "this.form.submit();" %> + [l(:label_day_plural).titleize, 'day']], @columns) %> : <%= select_tag('criterias[]', options_for_select([[]] + (@available_criterias.keys - @criterias).collect{|k| [l_or_humanize(@available_criterias[k][:label]), k]}), - :onchange => "this.form.submit();", :style => 'width: 200px', :id => nil, :disabled => (@criterias.length >= 3), :id => "criterias") %> + <%= link_to_function l(:button_apply), '$("query_form").submit()', :class => 'icon icon-yes' %> <%= link_to l(:button_clear), {:project_id => @project, :issue_id => @issue, :period_type => params[:period_type], :period => params[:period], :from => @from, :to => @to, :columns => @columns}, :class => 'icon icon-undo' %>

<% end %>