|
|
|
@ -63,7 +63,7 @@
|
|
|
|
|
<%= l(:field_is_private)%>
|
|
|
|
|
</span>
|
|
|
|
|
<% end %>
|
|
|
|
|
<%if @course.tea_id == User.current.id && @course.outline == 0%>
|
|
|
|
|
<%if @course.tea_id == User.current.id %>
|
|
|
|
|
<span>
|
|
|
|
|
<a href="javascript:void(0)" onclick="course_outline('<%= @course.id%>');">设置大纲</a>
|
|
|
|
|
</span>
|
|
|
|
@ -172,6 +172,7 @@
|
|
|
|
|
<%= call_hook :view_layouts_base_body_bottom %>
|
|
|
|
|
</body>
|
|
|
|
|
<script>
|
|
|
|
|
var blog_artile_list_html = '';
|
|
|
|
|
$(function(){
|
|
|
|
|
$(document).on('input','input[name="course_outline_search"]',function(e){
|
|
|
|
|
throttle(course_outline_search,window,e);
|
|
|
|
@ -180,14 +181,34 @@
|
|
|
|
|
clearTimeout(method.tId);
|
|
|
|
|
method.tId=setTimeout(function(){
|
|
|
|
|
method.call(context,e);
|
|
|
|
|
},300);
|
|
|
|
|
},500);
|
|
|
|
|
}
|
|
|
|
|
function course_outline_search(e){
|
|
|
|
|
// if($(e.target).val().trim() == ''){
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
$("#course_outline_hint").hide();
|
|
|
|
|
$.ajax({
|
|
|
|
|
url:'',
|
|
|
|
|
url:'<%=search_course_outline_course_path(@course) %>'+"?&title="+ e.target.value,
|
|
|
|
|
type:'post',
|
|
|
|
|
success:function(data){
|
|
|
|
|
|
|
|
|
|
if(data.length != 0 ){
|
|
|
|
|
$("#course_outline_list").html('');
|
|
|
|
|
for(var i =0;i<data.length;i++){
|
|
|
|
|
var html = ' <ul class="blogRow"> '+
|
|
|
|
|
' <li class="fl"> '+
|
|
|
|
|
'<input name="outline_id" type="radio" value="'+data[i].blog_comment.id+'" class="courseSendCheckbox"/>'+
|
|
|
|
|
'</li>'+
|
|
|
|
|
'<li class="blogTitle fl">'+data[i].blog_comment.title+'</li>'+
|
|
|
|
|
'</ul>'+
|
|
|
|
|
'<div class="homeworkPublishTime">发布时间:'+data[i].blog_comment.created_at.match(/(\S*)T/)[1]+'</div>';
|
|
|
|
|
$("#course_outline_list").append(html)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
$("#course_outline_hint").show();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|