Commit 37f3d0f25b7188312e5d781514245a2853054e4b
1 parent
2aa620c2
Exists in
master
and in
4 other branches
Fix newlines in how-to-merge. Added steps description. Fixes #3772
Showing
2 changed files
with
16 additions
and
14 deletions
Show diff stats
app/assets/javascripts/merge_requests.js.coffee
| ... | ... | @@ -21,6 +21,13 @@ class MergeRequest |
| 21 | 21 | this.initMergeWidget() |
| 22 | 22 | this.$('.show-all-commits').on 'click', => |
| 23 | 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 | 32 | # Local jQuery finder |
| 26 | 33 | $: (selector) -> | ... | ... |
app/views/merge_requests/show/_how_to_merge.html.haml
| ... | ... | @@ -3,22 +3,17 @@ |
| 3 | 3 | %a.close{href: "#"} × |
| 4 | 4 | %h3 How To Merge |
| 5 | 5 | .modal-body |
| 6 | + %p | |
| 7 | + %strong Step 1. | |
| 8 | + Checkout target branch and get recent objects from GitLab | |
| 6 | 9 | %pre.dark |
| 7 | - = preserve do | |
| 10 | + :preserve | |
| 8 | 11 | git checkout #{@merge_request.target_branch} |
| 9 | 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 | 18 | git merge origin/#{@merge_request.source_branch} |
| 11 | 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 | - | ... | ... |