PULL Request部分功能
This commit is contained in:
parent
76a3686f9f
commit
d97c559e9c
|
@ -1,7 +1,7 @@
|
|||
<div class="pd15box">
|
||||
<div class="clear mb30">
|
||||
<%= form_tag(url_for(:controller => 'pull_requests', :action => 'create_pull_request_comment', :project_id => @project.id), :id => 'pull_request_comment_form', :method => "post", :remote => true) do %>
|
||||
<textarea id="pull_request_comment" name="pull_request_comment" class="pullreques_reply_textarea"></textarea>
|
||||
<textarea id="pull_request_comment" name="pull_request_comment" class="pullreques_reply_textarea" style="padding-left: 0px;"></textarea>
|
||||
<span id ="pr_comment_tip" class="fontGrey2 c_red" style="display: none">内容不能为空</span>
|
||||
<a href="javascript:void(0);" class="btn btn-blue fr" onclick="pull_request_commit()">留言</a>
|
||||
<% end %>
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
<div class="pullreques_pullbox">
|
||||
<div class="pullreques_pull_top clear">
|
||||
<p class="fl c_grey ml15">2016-09-12</p>
|
||||
|
@ -50,32 +51,10 @@
|
|||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="pullreques_pullbox">
|
||||
<div class="pullreques_pull_top clear">
|
||||
<p class="fl c_grey ml15">2016-09-12</p>
|
||||
<p class="fr c_green mr15">2个提交</p>
|
||||
</div>
|
||||
<ul class="pullreques_pull_list">
|
||||
<li class="clear">
|
||||
<span class="fl c_grey ml15 ">19分钟前</span>
|
||||
<a href="javascript:void(0);" target="_blank" class="pullreques_pull_name fl ml10"> 姚虫虫姚虫虫姚虫虫 </a>
|
||||
<p class="pullreques_pull_txt ml10 fl">项目导航栏数字错误</p>
|
||||
<span class="fr mr15 c_grey">acbc94af</span>
|
||||
</li>
|
||||
<li class="clear">
|
||||
<span class="fl c_grey ml15 ">19分钟前</span>
|
||||
<a href="javascript:void(0);" target="_blank" class="pullreques_pull_name fl ml10"> 姚虫虫</a>
|
||||
<p class="pullreques_pull_txt ml10 fl">项目导航栏数字错误</p>
|
||||
<span class="fr mr15 c_grey">acbc94af</span>
|
||||
</li>
|
||||
<li class="clear">
|
||||
<span class="fl c_grey ml15 ">19分钟前</span>
|
||||
<a href="javascript:void(0);" target="_blank" class="pullreques_pull_name fl ml10"> 尹刚 </a>
|
||||
<p class="pullreques_pull_txt ml10 fl">Merge branch 'develop' of https://git.trustie.net/jacknudt/trustieforge into develop</p>
|
||||
<span class="fr mr15 c_grey">acbc94af</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -28,32 +28,32 @@
|
|||
<div class="alert alert-orange mb15 ">
|
||||
在管理员接受后,将由系统自动合并。<%= link_to "接受", accept_pull_request_project_pull_request_path(@request.id, :project_id => @project.id), :class => "linkBlue2", :remote => true %>接受</a>
|
||||
</div>
|
||||
<div class="new_roadmap_conbox " >
|
||||
<div class="new_roadmap_conbox mb10" >
|
||||
<div class=" clear">
|
||||
<ul class="new_roadmap_nav fl" >
|
||||
<li class="new_roadmap_nav_hover ">
|
||||
<%= link_to "评论<span class='new_roadmap_nav_taghover ml5'>#{@comments_count}</span>".html_safe, pull_request_comments_project_pull_request_path(@request.id, :project_id => @project.id, :type => "1"), :remote => true, :class => "new_roadmap_type_nomal" %>
|
||||
<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'>#{@comments_count}</span>".html_safe, pull_request_comments_project_pull_request_path(@request.id, :project_id => @project.id, :type => "1"), :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1" %>
|
||||
<!--<a href="javascript:void(0);" id="new_roadmap_type_1" class="new_roadmap_type_nomal" >评论<span id="new_roadmap_num_1" class="new_roadmap_nav_taghover ml5">210</span></a>-->
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to "提交<span class='new_roadmap_nav_tagnomal ml5'>#{@commits_count}</span>".html_safe, pull_request_commits_project_pull_request_path(@request.id, :project_id => @project.id, :type => "2"), :remote => true, :class => "new_roadmap_type_nomal" %></li>
|
||||
<li id="new_roadmap_nav_2" onclick="HoverLi(2);">
|
||||
<%= link_to "提交<span class='new_roadmap_nav_tagnomal ml5' id='new_roadmap_num_2'>#{@commits_count}</span>".html_safe, pull_request_commits_project_pull_request_path(@request.id, :project_id => @project.id, :type => "2"), :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_2" %></li>
|
||||
<!--<a href="javascript:void(0);" id="new_roadmap_type_2" class="new_roadmap_type_nomal" >提交<span id="new_roadmap_num_2" class="new_roadmap_nav_tagnomal ml5">25</span></a>-->
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to "改动<span class='new_roadmap_nav_tagnomal ml5'>#{@changes_count}</span>".html_safe, pull_request_changes_project_pull_request_path(@request.id, :project_id => @project.id, :type => "3"), :remote => true, :class => "new_roadmap_type_nomal" %></li>
|
||||
<li id="new_roadmap_nav_3" onclick="HoverLi(3);">
|
||||
<%= link_to "改动<span class='new_roadmap_nav_tagnomal ml5' id='new_roadmap_num_3'>#{@changes_count}</span>".html_safe, pull_request_changes_project_pull_request_path(@request.id, :project_id => @project.id, :type => "3"), :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_3" %></li>
|
||||
<!--<a href="javascript:void(0);" id="new_roadmap_type_3" class="new_roadmap_type_nomal" >改动<span id="new_roadmap_num_3" class="new_roadmap_nav_tagnomal ml5">5</span></a>-->
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<% if @type == nil || @type == "1" %>
|
||||
<div id="merge_record_0">
|
||||
<div id="merge_record_1">
|
||||
<%= render :partial => "pull_requests/pull_request_comments" %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div id="merge_record_1" class="undis">
|
||||
<div id="merge_record_2" class="undis">
|
||||
<%= render :partial => "pull_requests/pull_request_commits" %>
|
||||
</div>
|
||||
<div id="merge_record_2" class="undis">
|
||||
<div id="merge_record_3" class="undis">
|
||||
<%= render :partial => "pull_requests/pull_request_changes" %>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -61,15 +61,21 @@
|
|||
<!--PullReques结束-->
|
||||
|
||||
<script>
|
||||
$(".new_roadmap_nav li").click(function(){
|
||||
$(".new_roadmap_nav li").removeClass("new_roadmap_nav_hover");
|
||||
$(this).addClass("new_roadmap_nav_hover");
|
||||
|
||||
var index = $(".new_roadmap_nav li").index(this);
|
||||
|
||||
$("#merge_record_0, #merge_record_1, #merge_record_2").hide();
|
||||
console.log(index);
|
||||
$("#merge_record_" + index).show();
|
||||
});
|
||||
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('merge_record_'+i).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('merge_record_'+n).className='dis';
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
$("#merge_record_2").html('<%= escape_javascript( render :partial => "pull_requests/pull_request_changes") %>');
|
||||
$("#merge_record_3").html('<%= escape_javascript( render :partial => "pull_requests/pull_request_changes") %>');
|
|
@ -1 +1 @@
|
|||
$("#merge_record_0").html('<%= escape_javascript( render :partial => "pull_requests/pull_request_comments") %>');
|
||||
$("#merge_record_1").html('<%= escape_javascript( render :partial => "pull_requests/pull_request_comments") %>');
|
|
@ -1 +1 @@
|
|||
$("#merge_record_1").html('<%= escape_javascript( render :partial => "pull_requests/pull_request_commits") %>');
|
||||
$("#merge_record_2").html('<%= escape_javascript( render :partial => "pull_requests/pull_request_commits") %>');
|
|
@ -981,7 +981,7 @@ a.sortdownbtn{background: url(/images/sy/liststyle.png) 0 -12px no-repeat; width
|
|||
.pullreques_blueicon{ background: url(/images/new_project/icons_issue.png) 0 -299px no-repeat; display: inline-block; width: 43px; height: 16px;}
|
||||
.pullreques_greyicon{ background: url(/images/new_project/icons_issue.png) 0 -322px no-repeat; display: inline-block; width: 43px; height: 16px;}
|
||||
.pullreques_greyicon02{ background: url(/images/new_project/icons_issue.png) 0 -344px no-repeat; display: inline-block; width:43px; height: 16px;}
|
||||
.pullreques_reply_textarea{ width: 100%; padding:0; height: 60px; color: #666;}
|
||||
.pullreques_reply_textarea{ width: 100%; padding:2; height: 60px; color: #666;}
|
||||
.pullreques_reply_list li{ padding:15px 0; border-top: 1px dashed #ddd; }
|
||||
.pullreques_reply_user_img{ width:50px;height:50px; -webkit-border-radius:50px;-moz-border-radius:50px;-o-border-radius:50px;border-radius:50px;}
|
||||
a.pullreques_reply_name{ font-weight: bold; color: #333;}
|
||||
|
|
Loading…
Reference in New Issue