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 @@