From 457cf72263c9c91ef14670f882aa44a11cacd6aa Mon Sep 17 00:00:00 2001 From: huang Date: Wed, 25 May 2016 14:08:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=AD=E8=A1=8C=E6=A0=B7=E5=BC=8F=20?= =?UTF-8?q?=E5=8F=91=E9=80=81JS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_resources_list.html.erb | 19 ++++++++++++++++--- app/views/users/user_resource.html.erb | 2 +- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/app/views/users/_resources_list.html.erb b/app/views/users/_resources_list.html.erb index 26e8f922b..cdd270a56 100644 --- a/app/views/users/_resources_list.html.erb +++ b/app/views/users/_resources_list.html.erb @@ -99,13 +99,26 @@ if (lastSendType === '2'){ //如果已经发送过一次了,那么就应该沿用上次发送的类型。 $.ajax({ type: 'get', - url: '<%= search_user_project_user_path(User.current.id)%>' + '?' + $("#resources_list_form").serialize() + "&type=<%= @type%>", + url: '<%= search_user_project_user_path(User.current.id) %>' + '?' + $("#resources_list_form").serialize() + "&type=<%= @type %>", data:{send_type:'file'} }); - }else{ + }else if (lastSendType === '1'){ $.ajax({ type: 'get', - url: '<%= search_user_course_user_path(User.current.id)%>' + '?'+ $("#resources_list_form").serialize() + "&type=<%= @type%>", + url: '<%= search_user_course_user_path(User.current.id) %>' + '?' + $("#resources_list_form").serialize() + "&type=<%= @type %>", + data:{send_type:'file'} + }); + }else if (lastSendType === '3'){ + $.ajax({ + type: 'get', + url: '<%= search_user_org_user_path(User.current.id) %>' + '?' + $("#resources_list_form").serialize() + "&type=<%= @type %>", + data:{send_type:'file'} + }); + } + else{ + $.ajax({ + type: 'get', + url: '<%= search_user_course_user_path(User.current.id)%>' + '?'+ $("#resources_list_form").serialize() + "&type=<%= @type %>", data:{send_type:'file'} }); diff --git a/app/views/users/user_resource.html.erb b/app/views/users/user_resource.html.erb index d2e3242d8..3c70e6c33 100644 --- a/app/views/users/user_resource.html.erb +++ b/app/views/users/user_resource.html.erb @@ -58,7 +58,7 @@ -
  •  
  • +
  •  
  • <%= render :partial => 'user_resource_type_filter' %>