diff --git a/app/views/issues/index.html.erb b/app/views/issues/index.html.erb index d1bde712e..73decbf95 100644 --- a/app/views/issues/index.html.erb +++ b/app/views/issues/index.html.erb @@ -44,12 +44,30 @@ // }); } - function remote_function_export() { - $("#export_issue_hidden").attr("value","1"); -// $("#issue_query_form").attr("format","xls"); - $("#issue_query_form").submit(); + function remote_function_export(project_id) { +// $("#export_issue_hidden").attr("value","1"); +// $("#issue_query_form").attr("set_filter","1"); +// $("#issue_query_form").attr("action","/projects/"+project_id+"/issues.xls"); +// $("#issue_query_form").submit(); +// $("#issue_query_form").attr("action","/projects/"+project_id+"/issues"); // $("#issue_query_form").removeAttr("format"); - $("#export_issue_hidden").attr("value","0"); +// $("#issue_query_form").attr("set_filter","0"); +// $("#export_issue_hidden").attr("value","0"); + + var tracker_id = $("#tracker_id").attr("value"); + var subject = $("#v_subject").attr("value"); + var assigned_to_id = $("#assigned_to_id").attr("value"); + var fixed_version_id = $("#fixed_version_id").attr("value"); + var status_id = $("#status_id").attr("value"); + var done_ratio = $("#done_ratio").attr("value"); + var test = $("#test").attr("value"); + var author_id = $("#author_id").attr("value"); + var issue_create_date_start = $("#issue_date_start_issue_export").attr("value"); + var issue_create_date_end = $("#issue_date_end_issue_export").attr("value"); + $("#sendexcel").attr("href","/projects/"+project_id+"/issues.xls?export=true&set_filter=1&tracker_id="+tracker_id+"&assigned_to_id="+assigned_to_id+"&fixed_version_id="+fixed_version_id+"&status_id="+status_id+"&done_ratio="+done_ratio+"&test="+test+"&author_id="+author_id+"&subject="+subject+"&issue_create_date_start="+issue_create_date_start+"&issue_create_date_end="+issue_create_date_end); + ///projects/1811/issues.xls?export=true&set_filter=1 + + } // function nh_reset_form() { @@ -106,11 +124,11 @@
  • 关闭<%#= @issues_filter_author_count %><%= @project.issues.where(:status_id => 5 ).visible.all.count %>
  • - - " class="hw_btn_blue fr" alt="导出EXCEL" onclick="remote_function_export()">导出EXCEL + + " id="sendexcel" class="hw_btn_blue fr" alt="导出EXCEL" onclick="remote_function_export('<%= @project.id %>')">导出EXCEL <% unless @project.enabled_modules.where("name = 'issue_tracking'").empty? %> - <%= form_tag({:controller => 'issues', :action => 'index', :project_id => @project},:remote=>'true', :method => :get,:id=>"issue_query_form", :class => 'query_form') do %> + <%= form_tag({:controller => 'issues', :action => 'index', :project_id => @project},:remote=>'xls', :method => :get,:id=>"issue_query_form", :class => 'query_form') do %> <%= hidden_field_tag 'set_filter', '1' %> <%= hidden_field_tag 'export_issue_hidden', '0' %> @@ -122,12 +140,12 @@ 清除
    - + <%= calendar_for('issue_create_date_end_show')%>
    - + <%= calendar_for('issue_create_date_start_show')%>