|
|
|
@ -6,20 +6,25 @@
|
|
|
|
|
<div class="padding30">
|
|
|
|
|
<p class="clearfix mb20">
|
|
|
|
|
<span class="upload_Title">标题</span>
|
|
|
|
|
<%= f.text_field :title, placeholder: '例如:软件工程教学案例', class: 'greyInput winput-240-35 mr20 fl' %>
|
|
|
|
|
<li class="fl">
|
|
|
|
|
<%= f.text_field :title, placeholder: '例如:软件工程教学案例', class: 'greyInput winput-240-35 mr20 fl' %>
|
|
|
|
|
<p style="height:20px;line-height:20px;"><span class="color-red none" id="title_notice">请输入标题</span></p>
|
|
|
|
|
</li>
|
|
|
|
|
<span class="color-grey-c font-12 fl mt5">简明扼要介绍文档&视频所包含的主要的内容</span>
|
|
|
|
|
</p>
|
|
|
|
|
<div>
|
|
|
|
|
<%= render partial: 'attachments/from_libraries', locals: { container: @library } %>
|
|
|
|
|
<p style="height:22px;line-height:22px;"><span class="color-red none" id="file_notice">请上传附件</span></p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="padding30 bor-top-greyE">
|
|
|
|
|
<div class="clearfix df">
|
|
|
|
|
<span class="upload_Title">描述</span>
|
|
|
|
|
<div class="flex1">
|
|
|
|
|
<div id="libraries_description">
|
|
|
|
|
<div id="libraries_description" style="margin:0px">
|
|
|
|
|
<%= f.text_area :content %>
|
|
|
|
|
</div>
|
|
|
|
|
<p style="height:22px;line-height:22px;"><span class="color-red none" id="des_notice">请输入描述内容</span></p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -85,17 +90,23 @@
|
|
|
|
|
var content = $("textarea[name='library[content]']").val();
|
|
|
|
|
|
|
|
|
|
if (!title || title.length == 0) {
|
|
|
|
|
alert('请输入标题');
|
|
|
|
|
$("#title_notice").removeClass("none");
|
|
|
|
|
return
|
|
|
|
|
}else{
|
|
|
|
|
$("#title_notice").addClass("none");
|
|
|
|
|
}
|
|
|
|
|
if (!content || content.length == 0) {
|
|
|
|
|
alert('请输入描述');
|
|
|
|
|
$("#des_notice").removeClass("none");
|
|
|
|
|
return
|
|
|
|
|
}else{
|
|
|
|
|
$("#des_notice").addClass("none");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if($('.attachments_fields .attachment').length == 0){
|
|
|
|
|
alert('请上传附件');
|
|
|
|
|
$("#file_notice").removeClass("none");
|
|
|
|
|
return
|
|
|
|
|
}else{
|
|
|
|
|
$("#file_notice").addClass("none");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$('.library-form-container form').submit();
|
|
|
|
@ -109,7 +120,7 @@
|
|
|
|
|
|
|
|
|
|
var message = '<%= flash[:message] %>';
|
|
|
|
|
if (message.length > 0) {
|
|
|
|
|
alert(message);
|
|
|
|
|
sure_confirm_box("提示",450,200,message);
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
</script>
|