|
|
@ -9,11 +9,11 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="new-merge-wrap borderBottomNone">
|
|
|
|
<div class="new-merge-wrap borderBottomNone">
|
|
|
|
<div class="merge-option-name fl" style="padding:5px 0">源分支</div>
|
|
|
|
<div class="merge-option-name fl" style="padding:5px 0">源分支</div>
|
|
|
|
<%= select_tag :branch, options_for_select(@source_rev), :name => "source_branch", :value => "source_branch", :class => "ml30 fontGrey3 fb fl", :style => "padding:5px 0 5px 5px;" %>
|
|
|
|
<%= select_tag :branch, options_for_select(@source_rev), :id => "source_branch", :name => "source_branch", :value => "source_branch", :class => "ml30 fontGrey3 fb fl", :style => "padding:5px 0 5px 5px;" %>
|
|
|
|
<div class="cl mb10"></div>
|
|
|
|
<div class="cl mb10"></div>
|
|
|
|
<div class="merge-option-name fl" style="padding:5px 0">目标分支</div>
|
|
|
|
<div class="merge-option-name fl" style="padding:5px 0">目标分支</div>
|
|
|
|
<% if @forked_project.nil? %>
|
|
|
|
<% if @forked_project.nil? %>
|
|
|
|
<%= select_tag :branch, options_for_select(@source_rev), :name => "target_branch", :value => "target_branch",:class => "ml30 fontGrey3 fb fl", :style => "padding:5px 0 5px 5px;", :id => "targetBranch" %>
|
|
|
|
<%= select_tag :branch, options_for_select(@source_rev), :id => "pull_request_branch", :name => "target_branch", :value => "target_branch",:class => "ml30 fontGrey3 fb fl", :style => "padding:5px 0 5px 5px;" %>
|
|
|
|
<% else %>
|
|
|
|
<% else %>
|
|
|
|
<select onchange="choice_branch(this.value, document.getElementById('pull_request_branch'), <%= @source_rev %>, <%= @forked_rev %>);" name="source_project" value="source_project" class="ml30 fontGrey3 fb fl" style = "padding:5px 0 5px 5px;">
|
|
|
|
<select onchange="choice_branch(this.value, document.getElementById('pull_request_branch'), <%= @source_rev %>, <%= @forked_rev %>);" name="source_project" value="source_project" class="ml30 fontGrey3 fb fl" style = "padding:5px 0 5px 5px;">
|
|
|
|
<option value="source_project_name"><%= @source_project_name %></option>
|
|
|
|
<option value="source_project_name"><%= @source_project_name %></option>
|
|
|
@ -26,6 +26,8 @@
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<div class="cl"></div>
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
|
|
|
<p id ="pull_request_branch_error" class="ml100 fontGrey2 mt5 c_red" style="display: none">同一个项目的源分支和目标分支不能相同</p>
|
|
|
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="new-merge-row b_grey" style="border-top:1px solid #ddd;">
|
|
|
|
<div class="new-merge-row b_grey" style="border-top:1px solid #ddd;">
|
|
|
|
<a href="javascript:void(0);" class="BlueCirBtn fl ml10" onclick="pull_request_commit()">提交请求</a>
|
|
|
|
<a href="javascript:void(0);" class="BlueCirBtn fl ml10" onclick="pull_request_commit()">提交请求</a>
|
|
|
@ -50,6 +52,22 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function regex_branch()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var source_branch = $.trim($("#source_branch").val());
|
|
|
|
|
|
|
|
var target_branch = $.trim($("#pull_request_branch").val());
|
|
|
|
|
|
|
|
if(source_branch == target_branch)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
$("#pull_request_branch_error").show();
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
$("#pull_request_branch_error").hide();
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//提交pull request
|
|
|
|
//提交pull request
|
|
|
|
function pull_request_commit()
|
|
|
|
function pull_request_commit()
|
|
|
|
{
|
|
|
|
{
|
|
|
|