课程发送资源 以及 项目发送资源

This commit is contained in:
lizanle 2015-12-30 10:00:45 +08:00
parent 1d0e6e1c5c
commit fd4d2910d0
3 changed files with 32 additions and 2 deletions

View File

@ -274,6 +274,19 @@
$this.bind('keyup click mousemove', reset);
});
}
function check_des(event){
if($(".sectionContent").find('input[type="radio"]:checked').length <= 0){
event.preventDefault();
$(".orgDirection").text('目标地址组织不能为空')
return false;
}else if($(".columnContent").find('input[type="radio"]:checked').length <= 0){
event.preventDefault();
$(".orgDirection").text('目标地址栏目不能为空')
return false;
}else{
return true;
}
}
<% if User.current.logged? %>
var sendType = '1';
@ -290,7 +303,10 @@
url: '<%= search_user_course_user_path(User.current)%>' + '?send_id=' + id
});
}else if( lastSendType == '3'){//组织
$.ajax({
type: 'get',
url: '<%= search_user_org_user_path(User.current)%>' + '?send_id=' + id
});
}else{
$.ajax({
type: 'get',

View File

@ -49,7 +49,7 @@
<div class="cl"></div>
<div class="orgDirection mb10 break_word" style="white-space: nowrap;-o-text-overflow:ellipsis;text-overflow: ellipsis;overflow: hidden">目标地址:</div>
<div class="courseSendSubmit mr15">
<%= submit_tag '确定',:class=>'sendSourceText',:onfocus=>'this.blur();' %>
<%= submit_tag '确定',:class=>'sendSourceText',:onfocus=>'this.blur();',:onclick=>"check_des(event);" %>
</div>
<div class="courseSendCancel">
<a href="javascript:void(0);" onclick="hideModal();" class="sendSourceText">取消</a>

View File

@ -41,6 +41,20 @@
function submit_files(){
$("#upload_form").submit();
}
function check_des(event){
if($(".sectionContent").find('input[type="radio"]:checked').length <= 0){
event.preventDefault();
$(".orgDirection").text('目标地址组织不能为空')
return false;
}else if($(".columnContent").find('input[type="radio"]:checked').length <= 0){
event.preventDefault();
$(".orgDirection").text('目标地址栏目不能为空')
return false;
}else{
return true;
}
}
</script>
<div class="homepageRightBanner">
<div class="NewsBannerName">资源库</div>