我的作品应该是缺省显示的tab,等到老师启动匿评后,待评作品才是缺省tab
学生的作业主页中,“所有作品”应该是缺省的tab页
This commit is contained in:
parent
7d97889261
commit
f149dd3a57
|
@ -27,20 +27,30 @@
|
|||
$("#what_is_project_div").slideToggle();
|
||||
}
|
||||
|
||||
window.onready = function()
|
||||
{
|
||||
<% if !@is_teacher && @homework_list.count > 0 && @bid.comment_status == 1%>
|
||||
//登录者不是老师,且作业列表数目不为0,且作业处于开启匿评阶段
|
||||
var alert_model = "'#ajax-modal'";
|
||||
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'homework_attach/praise_alert') %>');
|
||||
showModal('ajax-modal', '480px');
|
||||
$('#ajax-modal').css('height','240px');
|
||||
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
|
||||
"<a href='#' onclick='hiddent_alert_model();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
|
||||
$('#ajax-modal').parent().css("top","").css("left","").css("width","511");
|
||||
$('#ajax-modal').parent().addClass("alert_praise");
|
||||
<% end %>
|
||||
}
|
||||
$(document).ready(
|
||||
function()
|
||||
{
|
||||
<% if !@is_teacher && @homework_list.count > 0 && @bid.comment_status == 1%>
|
||||
//登录者不是老师,且作业列表数目不为0,且作业处于开启匿评阶段
|
||||
var alert_model = "'#ajax-modal'";
|
||||
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'homework_attach/praise_alert') %>');
|
||||
showModal('ajax-modal', '480px');
|
||||
$('#ajax-modal').css('height','240px');
|
||||
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
|
||||
"<a href='#' onclick='hiddent_alert_model();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
|
||||
$('#ajax-modal').parent().css("top","").css("left","").css("width","511");
|
||||
$('#ajax-modal').parent().addClass("alert_praise");
|
||||
<% end %>
|
||||
|
||||
<% unless @is_teacher%>
|
||||
<% if @bid.comment_status == 0%>
|
||||
$("#my_homework").click();
|
||||
<% elsif @bid.comment_status == 2%>
|
||||
$("#all_homeworks").click();
|
||||
<% end %>
|
||||
<% end %>
|
||||
}
|
||||
);
|
||||
|
||||
function hiddent_alert_model(){hideModal($('#popbox02'));}
|
||||
|
||||
|
|
|
@ -29,15 +29,15 @@
|
|||
<% else %>
|
||||
<ul>
|
||||
<li id="tb_5" class="hovertab">
|
||||
<%= link_to "待评作品", get_student_batch_homework_homework_attach_index_path(:bid_id => @bid.id), {:remote => true}%>
|
||||
<%= link_to "待评作品", get_student_batch_homework_homework_attach_index_path(:bid_id => @bid.id), {id: 'student_batch_homework',:remote => true}%>
|
||||
</li>
|
||||
<li id="tb_6" class="normaltab">
|
||||
<%= link_to "我的作品", get_my_homework_homework_attach_index_path(:bid_id => @bid.id), {:remote => true}%>
|
||||
<%= link_to "我的作品", get_my_homework_homework_attach_index_path(:bid_id => @bid.id), {id: 'my_homework',:remote => true}%>
|
||||
</li>
|
||||
<% if @bid.comment_status == 2 %>
|
||||
<!-- 匿评结束后才能看到全部作业列表 -->
|
||||
<li id="tb_7" class="normaltab">
|
||||
<%= link_to "所有作品", get_homeworks_homework_attach_index_path(:bid_id => @bid.id), {:remote => true}%>
|
||||
<%= link_to "所有作品", get_homeworks_homework_attach_index_path(:bid_id => @bid.id), {id: 'all_homeworks',:remote => true}%>
|
||||
</li>
|
||||
<% end %>
|
||||
<li id="tb_8" class="normaltab">
|
||||
|
|
Loading…
Reference in New Issue