Commit 37f3d0f25b7188312e5d781514245a2853054e4b

Authored by Dmitriy Zaporozhets
1 parent 2aa620c2

Fix newlines in how-to-merge. Added steps description. Fixes #3772

app/assets/javascripts/merge_requests.js.coffee
@@ -21,6 +21,13 @@ class MergeRequest @@ -21,6 +21,13 @@ class MergeRequest
21 this.initMergeWidget() 21 this.initMergeWidget()
22 this.$('.show-all-commits').on 'click', => 22 this.$('.show-all-commits').on 'click', =>
23 this.showAllCommits() 23 this.showAllCommits()
  24 +
  25 + modal = $('#modal_merge_info').modal modal: true, show:false
  26 +
  27 + $('.how_to_merge_link').bind "click", ->
  28 + modal.show()
  29 + $('.modal-header .close').bind "click", ->
  30 + modal.hide()
24 31
25 # Local jQuery finder 32 # Local jQuery finder
26 $: (selector) -> 33 $: (selector) ->
app/views/merge_requests/show/_how_to_merge.html.haml
@@ -3,22 +3,17 @@ @@ -3,22 +3,17 @@
3 %a.close{href: "#"} × 3 %a.close{href: "#"} ×
4 %h3 How To Merge 4 %h3 How To Merge
5 .modal-body 5 .modal-body
  6 + %p
  7 + %strong Step 1.
  8 + Checkout target branch and get recent objects from GitLab
6 %pre.dark 9 %pre.dark
7 - = preserve do 10 + :preserve
8 git checkout #{@merge_request.target_branch} 11 git checkout #{@merge_request.target_branch}
9 git fetch origin 12 git fetch origin
  13 + %p
  14 + %strong Step 2.
  15 + Merge source branch into target branch and push changes to GitLab
  16 + %pre.dark
  17 + :preserve
10 git merge origin/#{@merge_request.source_branch} 18 git merge origin/#{@merge_request.source_branch}
11 git push origin #{@merge_request.target_branch} 19 git push origin #{@merge_request.target_branch}
12 -  
13 -  
14 -:javascript  
15 - $(function(){  
16 - var modal = $('#modal_merge_info').modal({modal: true, show:false});  
17 - $('.how_to_merge_link').bind("click", function(){  
18 - modal.show();  
19 - });  
20 - $('.modal-header .close').bind("click", function(){  
21 - modal.hide();  
22 - })  
23 - })  
24 -