Rspec test repo replaced.\nMerge Requests improved
This commit is contained in:
parent
781f5aa6fb
commit
3676838dc9
18 changed files with 90 additions and 41 deletions
|
@ -10,10 +10,14 @@
|
|||
.input= f.text_area :title, :class => "xxlarge", :maxlength => 255, :rows => 5
|
||||
.clearfix
|
||||
= f.label :source_branch, "From"
|
||||
.input= f.select(:source_branch, @project.heads.map(&:name), { :include_blank => "Select branch" }, :style => "width:250px")
|
||||
.input
|
||||
= f.select(:source_branch, @project.heads.map(&:name), { :include_blank => "Select branch" }, :style => "width:250px")
|
||||
.mr_source_commit
|
||||
.clearfix
|
||||
= f.label :target_branch, "To"
|
||||
.input= f.select(:target_branch, @project.heads.map(&:name), { :include_blank => "Select branch" }, :style => "width:250px")
|
||||
.input
|
||||
= f.select(:target_branch, @project.heads.map(&:name), { :include_blank => "Select branch" }, :style => "width:250px")
|
||||
.mr_target_commit
|
||||
.clearfix
|
||||
= f.label :assignee_id, "Assign to"
|
||||
.input= f.select(:assignee_id, @project.users.all.collect {|p| [ p.name, p.id ] }, { :include_blank => "Select user" }, :style => "width:250px")
|
||||
|
@ -34,5 +38,15 @@
|
|||
$('select#merge_request_assignee_id').chosen();
|
||||
$('select#merge_request_source_branch').chosen();
|
||||
$('select#merge_request_target_branch').chosen();
|
||||
|
||||
|
||||
|
||||
$("#merge_request_source_branch").live("change", function() {
|
||||
$.get("#{branch_from_project_merge_requests_path(@project)}", {ref: $(this).val() });
|
||||
});
|
||||
|
||||
$("#merge_request_target_branch").live("change", function() {
|
||||
$.get("#{branch_to_project_merge_requests_path(@project)}", {ref: $(this).val() });
|
||||
});
|
||||
});
|
||||
|
||||
|
|
2
app/views/merge_requests/branch_from.js.haml
Normal file
2
app/views/merge_requests/branch_from.js.haml
Normal file
|
@ -0,0 +1,2 @@
|
|||
:plain
|
||||
$(".mr_source_commit").html("#{escape_javascript(render 'commits/commit', :commit => @commit)}");
|
3
app/views/merge_requests/branch_to.js.haml
Normal file
3
app/views/merge_requests/branch_to.js.haml
Normal file
|
@ -0,0 +1,3 @@
|
|||
:plain
|
||||
$(".mr_target_commit").html("#{escape_javascript(render 'commits/commit', :commit => @commit)}");
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue