项目配置,创建版本库提示字样式调整,和Pull Requests页面的tab点击样式调整

This commit is contained in:
daiao 2016-11-24 09:47:10 +08:00
parent 61a3ffcbd0
commit 1c0b4e99a8
2 changed files with 29 additions and 8 deletions

View File

@ -18,7 +18,7 @@
<span style="display: none" class="c_orange ml100" id="valid_repository_name">版本库名是无效的</span>
</li>
<li class="clear">
<label class=" fl">&nbsp;&nbsp;</label>
<!-- <label class=" fl">&nbsp;&nbsp;</label>-->
<p class=" fl c_grey pro_new_grey">1.长度必须在1到254个字符之间<br/>
2.仅限使用小写字母a-z、数字、破折号-和下划线_<br>
3.一旦保存,标识无法修改</p>

View File

@ -3,9 +3,18 @@
<div class="new_roadmap_conbox mb10" >
<div class="new_roadmap_navbox clear">
<ul class="new_roadmap_nav fl" >
<li class="new_roadmap_nav_hover"><%= link_to "待处理<span class='new_roadmap_nav_taghover ml5'>#{@requests_opened_count}</span>".html_safe, project_pull_requests_path(:type => "1"), :remote => true, :class => "new_roadmap_type_nomal" %></li>
<li><%= link_to "已处理<span class='new_roadmap_nav_tagnomal ml5'>#{@requests_merged_count}</span>".html_safe, project_pull_requests_path(:type => "2"), :remote => true, :class => "new_roadmap_type_nomal" %></li>
<li><%= link_to "已关闭<span class='new_roadmap_nav_tagnomal ml5'>#{@requests_closed_count}</span>".html_safe, project_pull_requests_path(:type => "3"), :remote => true, :class => "new_roadmap_type_nomal" %></li>
<li class="new_roadmap_nav_hover" id="new_roadmap_nav_1" onclick="HoverLi(1);">
<%= link_to "待处理<span class='new_roadmap_nav_taghover ml5' id='new_roadmap_num_1'>#{@requests_opened_count}</span>".html_safe,
project_pull_requests_path(:type => "1"), :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1", :id => "new_roadmap_type_1" %>
</li>
<li id="new_roadmap_nav_2" onclick="HoverLi(2);">
<%= link_to "已处理<span class='new_roadmap_nav_tagnomal ml5' id='new_roadmap_num_2'>#{@requests_merged_count}</span>".html_safe,
project_pull_requests_path(:type => "2"), :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1", :id => "new_roadmap_type_2" %>
</li>
<li id="new_roadmap_nav_3" onclick="HoverLi(3);">
<%= link_to "已关闭<span class='new_roadmap_nav_tagnomal ml5' id='new_roadmap_num_3'>#{@requests_closed_count}</span>".html_safe,
project_pull_requests_path(:type => "3"), :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1", :id => "new_roadmap_type_3" %>
</li>
</ul>
<% if allow_pull_request(@project) && User.current.member_of?(@project) %>
<%= link_to "创建Pull Request", new_project_pull_request_path, :class => "btn btn-green fr mr15 mt10" %>
@ -34,11 +43,23 @@
<script>
// $("#mergeBanner").parent().css({"width":"730px","background-color":"#fff","padding":"10px","margin-left":"10px","margin-bottom":"10px"});
// $("#mergeBanner").parent().before("<div class='homepageRightBanner mb10'><span class='f16 fontGrey3'>Pull Request</span></div>");
function g(o){
return document.getElementById(o);
}
function HoverLi(n){
//如果有N个标签,就将i<=N;
for(var i=1;i<=3;i++){
g('new_roadmap_nav_'+i).className='new_roadmap_nav_nomal';
g('new_roadmap_type_'+i).className='new_roadmap_type_nomal';
g('new_roadmap_num_'+i).className='new_roadmap_nav_tagnomal';
g('pull_requests_list').className='undis';
}
g('new_roadmap_nav_'+n).className='new_roadmap_nav_hover';
g('new_roadmap_type_'+n).className='new_roadmap_type_hover';
g('new_roadmap_num_'+n).className='new_roadmap_nav_taghover';
g('pull_requests_list').className='dis';
}
$(".new_roadmap_nav li").click(function(){
$(".new_roadmap_nav li").removeClass("new_roadmap_nav_hover");
$(this).addClass("new_roadmap_nav_hover");
});
</script>
<% else %>
<%= render :partial => "projects/no_data" %>