项目配置,各个页面高度JS控制

This commit is contained in:
huang 2016-10-12 17:18:35 +08:00
parent 4348ae653f
commit b9b20ccc59
1 changed files with 11 additions and 3 deletions

View File

@ -24,7 +24,6 @@
</ul>
</div>
<div class="pro_new_setting_conbox fl ml10">
<div class="">
<div class="<%= show_memu == 'edit_project' ? 'pro_st_dis' : 'pro_st_undis'%>" id="pro_st_tbc_01">
<%= render :partial=>"projects/settings/new_edit" if User.current.allowed_to?(:edit_project, @project)%>
</div><!--tbc_01 end-->
@ -52,7 +51,6 @@
<div class="<%= show_memu == 'manage_repository' ? 'pro_st_dis' : 'pro_st_undis'%>" id="pro_st_tbc_06">
<%= render :partial=>"projects/settings/new_repositories" if User.current.allowed_to?(:manage_repository, @project)%>
</div><!--tbc_06 end-->
</div>
</div>
</div>
@ -78,8 +76,18 @@
});
var windowH = $(window).height();
var contentH = $(".pro_new_setting_conbox").height();
if(windowH >795.5) {
if(windowH > contentH + 329) {
$(".pro_new_setting_conbox").css("margin-bottom",windowH - 329 -contentH + "px");
}else{
$(".pro_new_setting_conbox").css("margin-bottom",0);
}
$(".pro_new_setting_leftnav ul li").live("click",function(){
var newContentH = $(".pro_new_setting_conbox").height();
if(windowH > newContentH + 329) {
$(".pro_new_setting_conbox").css("margin-bottom",windowH - 329 - newContentH + "px");
}else{
$(".pro_new_setting_conbox").css("margin-bottom",0);
}
});
</script>