左侧项目列表的展开
This commit is contained in:
parent
f67336fbe5
commit
1374444ec1
|
@ -2,7 +2,7 @@
|
|||
<li>
|
||||
<span class="user_icons_class"></span>
|
||||
<% count = ShieldActivity.where("container_type='User' and container_id=#{user.id} and shield_type='Project' and shield_id=#{project.id}").count %>
|
||||
<%= link_to project.name, project_path(project.id,:host=>Setting.host_name), :target => '_blank', :class => "course_list_menu hidden",:id => "show_project_#{project.id}", :title => (project.is_public? ? "公开项目:":"私有项目:") + project.name%>
|
||||
<%= link_to project.name, project_path(project.id,:host=>Setting.host_name), :target => '_blank', :class => "project_list_menu hidden",:id => "show_project_#{project.id}", :title => (project.is_public? ? "公开项目:":"私有项目:") + project.name%>
|
||||
|
||||
<div class="user_navmore_box">
|
||||
<ul class="<%#= count > 0 ? 'shild shildP':'subNavArrow'%>">
|
||||
|
@ -60,16 +60,16 @@
|
|||
|
||||
<% if all_count > (page.to_i+1) * 10%>
|
||||
<input type="hidden" value="<%= page%>" id="project_page_num">
|
||||
<a class="user_navmorebox" href="javascript:void(0);" id="user_show_more_project" onclick="show_more_project('<%= user_projects4show_user_path(user.id)%>');">
|
||||
<a class="user_navmorebox" href="javascript:void(0);" id="user_show_more_project" onclick="show_more_project('<%= user_projects4show_user_path(user.id,:page => page)%>');">
|
||||
<span class="user_icons_moreclass"></span>
|
||||
</a>
|
||||
<% end%>
|
||||
|
||||
<script type="text/javascript">
|
||||
var projectcount = <%= @user.projects.visible.count %>;
|
||||
var projectshowcount = document.getElementsByClassName("course_list_menu").length;
|
||||
var projectcount = <%= all_count %>;
|
||||
var projectshowcount = document.getElementsByClassName("project_list_menu").length;
|
||||
|
||||
if((projectcount <= projectshowcount)&&(projectcount > 5)){
|
||||
if((projectcount <= projectshowcount)&&(projectcount > 10)){
|
||||
$("#user_show_more_project").hide();
|
||||
$('#user_hide_project').show();
|
||||
}
|
||||
|
|
|
@ -328,7 +328,6 @@
|
|||
for(var i = 10; i < target.length; i++){
|
||||
target.eq(i).slideToggle();
|
||||
}
|
||||
$('#homepageLeftMenuForge').slideToggle();
|
||||
$('#hide_show_projecticon').toggleClass("user_icons_closeclass");
|
||||
$('#hide_show_projecticon').toggleClass("user_icons_moreclass");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue