From 5527b4e3a9c39c1290b7037de5ed7cfcc4aa83cb Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 1 Sep 2016 12:25:35 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E9=9A=90=E8=97=8F=E4=B9=8B?= =?UTF-8?q?=20=E5=85=AC=E5=85=B1=E8=B5=84=E6=BA=90=E5=BA=93=E5=BA=95?= =?UTF-8?q?=E7=AB=AF=E5=8F=91=E9=80=81=E9=9A=90=E8=97=8F=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_resources_list.html.erb | 29 ++++++++++++++++++++ app/views/users/_user_resource_info.html.erb | 12 ++++++-- 2 files changed, 38 insertions(+), 3 deletions(-) diff --git a/app/views/users/_resources_list.html.erb b/app/views/users/_resources_list.html.erb index e6e9687f3..77a2386fe 100644 --- a/app/views/users/_resources_list.html.erb +++ b/app/views/users/_resources_list.html.erb @@ -148,6 +148,35 @@ } } +// 隐藏非项目信息特用 + function batch_send_hidden(){ + if($("#resources_list_form").serialize() == ""){ + alert('暂时不支持多页选择,您当前页没有选择任何资源'); + return ; + } + if (lastSendType === '1'){ + $.ajax({ + type: 'get', + url: '<%= search_user_project_user_path(User.current.id) %>' + '?' + $("#resources_list_form").serialize() + "&type=<%= @type %>", + data:{send_type:'file'} + }); + }else if (lastSendType === '2'){ + $.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_project_user_path(User.current.id)%>' + '?'+ $("#resources_list_form").serialize() + "&type=<%= @type %>", + data:{send_type:'file'} + }); + + } + } + function preview(){ $("#contextMenu").hide(); document.oncontextmenu = function() {return true;} diff --git a/app/views/users/_user_resource_info.html.erb b/app/views/users/_user_resource_info.html.erb index 89f10e87b..d3b169a17 100644 --- a/app/views/users/_user_resource_info.html.erb +++ b/app/views/users/_user_resource_info.html.erb @@ -23,9 +23,15 @@ 删除
-
- 发送至 -
+ <% if hidden_unproject_infos %> +
+ 发送至 +
+ <% else %> +
+ 发送至 +
+ <% end %>
选择 0 个资源