From 80105181ce7aa5ec34aaaa61f4ce82f504a6856d Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 22 Sep 2016 13:41:46 +0800 Subject: [PATCH] =?UTF-8?q?issue=E4=B8=AD=E6=88=91=E7=9A=84issue=EF=BC=8C?= =?UTF-8?q?=E6=8C=87=E6=B4=BE=E7=BB=99=E6=88=91=E7=9A=84issue=E5=92=8C?= =?UTF-8?q?=E5=85=A8=E9=83=A8issue=20js=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/issues/index.html.erb | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/app/views/issues/index.html.erb b/app/views/issues/index.html.erb index 83645720a..9e6b9fac2 100644 --- a/app/views/issues/index.html.erb +++ b/app/views/issues/index.html.erb @@ -43,6 +43,30 @@ } } + // 点击的时候让过滤条件选中assign_to + function switch_assign_to(assign) { + var assign = "option[value =" + assign + "]" + $("#assignToMe").click(function(){ + + }); + $("select[id='assigned_to_id']").find(assign).attr("selected", "selected"); + remote_function(); + } + + // 点击的时候让过滤条件选中user_id + function createByMe(user_id) { + var user = "option[value =" + user_id + "]" + $("#createByMe").click(function(){ + + }); + $("select[id='author_id']").find(user).attr("selected", "selected"); + remote_function(); + } + + function all_reset_form() { + $("#issue_query_form")[0].reset(); + remote_function(); + } @@ -92,6 +116,11 @@ ) %> + 指派我的 + 所有的 + 我发布的 + +
 
@@ -113,6 +142,7 @@ <% end %>
+
<% if !@query.new_record? && @query.editable_by?(User.current) %> <%= link_to l(:button_edit), edit_query_path(@query), :class => 'icon icon-edit' %>