Fix selectbox when submit MR from fork to origin
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
parent
69ff7657d7
commit
ccae561f9b
|
|
@ -152,6 +152,10 @@ class Projects::MergeRequestsController < Projects::ApplicationController
|
||||||
@target_project = selected_target_project
|
@target_project = selected_target_project
|
||||||
@target_branches = @target_project.repository.branch_names
|
@target_branches = @target_project.repository.branch_names
|
||||||
@target_branches
|
@target_branches
|
||||||
|
|
||||||
|
respond_to do |format|
|
||||||
|
format.js
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def ci_status
|
def ci_status
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,9 @@
|
||||||
:plain
|
:plain
|
||||||
$(".target_branch").html("#{escape_javascript(options_for_select(@target_branches))}");
|
$(".target_branch").html("#{escape_javascript(options_for_select(@target_branches))}");
|
||||||
$(".target_branch").trigger("select2:updated");
|
|
||||||
|
$('select.target_branch').select2({
|
||||||
|
width: 'resolve',
|
||||||
|
dropdownAutoWidth: true
|
||||||
|
});
|
||||||
|
|
||||||
$(".mr_target_commit").html("");
|
$(".mr_target_commit").html("");
|
||||||
$(".target_branch").trigger("change");
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue