项目隐藏之 公共资源库底端发送隐藏课程信息

This commit is contained in:
huang 2016-09-01 12:25:35 +08:00
parent 4903064a5b
commit 5527b4e3a9
2 changed files with 38 additions and 3 deletions

View File

@ -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(){ function preview(){
$("#contextMenu").hide(); $("#contextMenu").hide();
document.oncontextmenu = function() {return true;} document.oncontextmenu = function() {return true;}

View File

@ -23,9 +23,15 @@
<a href="javascript:void(0);" class="replyGrey" onclick="batch_delete();">删除</a> </div> <a href="javascript:void(0);" class="replyGrey" onclick="batch_delete();">删除</a> </div>
<div class="cl"></div> <div class="cl"></div>
<div class="resourcesSelectSend mt10 fl"> <div class="resourcesSelectSend mt10 fl">
<% if hidden_unproject_infos %>
<div class="resourcesSelectSendButton fl mr15 inactive-border" onclick="batch_send();"> <div class="resourcesSelectSendButton fl mr15 inactive-border" onclick="batch_send();">
<a href="javascript:void(0);" class="sendButtonBlue db inactive-text" data-remote="true">发送至</a> <a href="javascript:void(0);" class="sendButtonBlue db inactive-text" data-remote="true">发送至</a>
</div> </div>
<% else %>
<div class="resourcesSelectSendButton fl mr15 inactive-border" onclick="batch_send_hidden();">
<a href="javascript:void(0);" class="sendButtonBlue db inactive-text" data-remote="true">发送至</a>
</div>
<% end %>
<div class="fl">选择&nbsp;<span class="c_red" id="res_count">0</span>&nbsp;个资源</div> <div class="fl">选择&nbsp;<span class="c_red" id="res_count">0</span>&nbsp;个资源</div>
</div> </div>