From 4903064a5ba651aa1003e9927d757831f8f1f76b Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 1 Sep 2016 12:18:39 +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=8F=B3=E9=94=AE?= =?UTF-8?q?=E5=8F=91=E9=80=81=E9=9A=90=E8=97=8F=E8=AF=BE=E7=A8=8B=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_resources_list.html.erb | 27 ++++++++++++++++++++ app/views/users/_user_resource_info.html.erb | 6 ++++- 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/app/views/users/_resources_list.html.erb b/app/views/users/_resources_list.html.erb index 3f5138107..e6e9687f3 100644 --- a/app/views/users/_resources_list.html.erb +++ b/app/views/users/_resources_list.html.erb @@ -87,6 +87,33 @@ } + function show_send_hidden(){ + $("#contextMenu").hide(); + document.oncontextmenu = function() {return true;} + line.children().css("background-color",'white'); + id = line.children().last().html(); + user_id = line.children().eq(5).html(); + allow = line.children().eq(13).html(); + if( allow == 0){ + alert('您无权发送私有资源') + }else{ + if (lastSendType === '2'){ //如果已经发送过一次了,那么就应该沿用上次发送的类型。 + $.ajax({ + type: 'get', + url: '<%= search_user_project_user_path(User.current.id) %>' + "?send_id=" + id + "&type=<%= @type %>", + data:{send_type:'file'} + }); + }else{ + $.ajax({ + type: 'get', + url: '<%= search_user_project_user_path(User.current.id)%>' + "?send_id=" + id + "&type=<%= @type %>", + data:{send_type:'file'} + }); + } + } + + } + function batch_send(){ if($("#resources_list_form").serialize() == ""){ alert('暂时不支持多页选择,您当前页没有选择任何资源'); diff --git a/app/views/users/_user_resource_info.html.erb b/app/views/users/_user_resource_info.html.erb index e00489193..89f10e87b 100644 --- a/app/views/users/_user_resource_info.html.erb +++ b/app/views/users/_user_resource_info.html.erb @@ -45,7 +45,11 @@
  • 预览
  • 重命名
  • -
  • 发送
  • + <% if hidden_unproject_infos %> +
  • 发送
  • + <% else %> +
  • 发送
  • + <% end %>
  • 删除