40 lines
1.4 KiB
Plaintext
40 lines
1.4 KiB
Plaintext
<div class="syllabus_box">
|
|
<h2 class="syllabus_h2_top"><span class="icon_course fl mt7 mr5"></span>项目列表</h2>
|
|
<%= render :partial => 'users/my_projects'%>
|
|
<div class="" style="height:20px; background:#eaebec;"></div>
|
|
<%= render :partial => 'users/my_joined_projects'%>
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
//如果右边的列表比左边的高度低则将右边的高度设为与左边对齐
|
|
$(function() {
|
|
var leftHeight = $("#LSide").height() - $(".fontGrey5").height() - 20;
|
|
var rightHeight = $(".homepageRight").height();
|
|
if (rightHeight < leftHeight) {
|
|
var diffHeight = leftHeight - rightHeight;
|
|
var tmpHeight = $(".syllabus_box").height() + diffHeight;
|
|
$(".syllabus_box").css("minHeight", tmpHeight);
|
|
}
|
|
});
|
|
function expand_projects(btnid,container,count){
|
|
var target = $(container).children('.syllabus_courses_list');
|
|
var btn = $(btnid);
|
|
if(btn.data('init')=='0'){
|
|
btn.data('init',1);
|
|
btn.html('点击收起');
|
|
target.show();
|
|
}else{
|
|
btn.data('init',0);
|
|
btn.html('共' + count + '个项目,点击全部展开');
|
|
target.hide();
|
|
target.eq(0).show();
|
|
target.eq(1).show();
|
|
target.eq(2).show();
|
|
target.eq(3).show();
|
|
target.eq(4).show();
|
|
btn.parent().parent().show();
|
|
}
|
|
}
|
|
</script>
|
|
|