You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pgfqe6ch8/app/views/syllabuses/index.html.erb

55 lines
2.3 KiB

<div class="edu-class-container">
<p class="mb10">
<%= link_to User.current.show_real_name, user_path(User.current),:class => "color-grey-9" %> > <%= link_to '课堂', courses_path(),:class => "color-grey-9" %> > 我的课堂
</p>
<div class="edu-con-bg01">
<div class="">
<div class="edu-tab clearfix mb20">
<ul id="edu-tab-nav" class="border-bottom-orange">
<li id="edu-tab-nav-1" class="new-tab-nav background-orange">
<%=link_to "全部", syllabuses_path(:tab => 1), :class => "tab_type font-16", :remote => true %>
</li>
<li id="edu-tab-nav-2" class="new-tab-nav">
<%=link_to "我管理的", syllabuses_path(:tab => 2), :class => "tab_type font-16", :remote => true %>
</li>
<li id="edu-tab-nav-3" class="new-tab-nav">
<%=link_to "我参与的", syllabuses_path(:tab => 3), :class => "tab_type font-16", :remote => true %>
</li>
<li>
<a href="/courses/new" class="white-btn orange-btn fr font-16 " style="margin-top:10px">+&nbsp;新建</a>
<a href="/courses/join_private_courses" class="white-btn orange-btn fr mr20 font-16 " style="margin-top:10px" data-method="post" data-remote="true" rel="nofollow" >+&nbsp;加入课堂</a>
</li>
</ul>
<div class="cl"></div>
<div id="edu-tab-con" class="box_bg_shandow">
<%= render :partial => "syllabus_index" %>
</div>
<div class="cl"></div>
</div>
</div>
</div>
</div>
<script>
function g(o){return document.getElementById(o);}
function HoverLi(n){
for(var i=1;i<=2;i++){
//g('edu-tab-nav-'+i).className='new-tab-nav';
g('edu-tab-con-'+i).className='undis';
$('#edu-tab-nav-'+i).removeClass('background-orange');
}
g('edu-tab-con-'+n).className='dis';
$('#edu-tab-nav-'+n).addClass('background-orange');
}
// type: 1表示正在进行 2表示一结束
$("#syllabuses_processing").live("click", function(){
$(this).addClass("active");
$(this).next().removeClass("active");
});
$("#syllabuses_end").live("click", function(){
$(this).addClass("active");
$(this).prev().removeClass("active");
});
</script>