Commit ce5fca48288043bf1e7077826a9b36a16b3eb5c7

Authored by Dmitriy Zaporozhets
1 parent 08bcf639

Fix MR modal

app/assets/javascripts/merge_requests.js.coffee
@@ -22,12 +22,7 @@ class MergeRequest @@ -22,12 +22,7 @@ class MergeRequest
22 this.$('.show-all-commits').on 'click', => 22 this.$('.show-all-commits').on 'click', =>
23 this.showAllCommits() 23 this.showAllCommits()
24 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() 25 + modal = $('#modal_merge_info').modal(show: false)
31 26
32 # Local jQuery finder 27 # Local jQuery finder
33 $: (selector) -> 28 $: (selector) ->
app/assets/stylesheets/sections/commits.scss
@@ -471,3 +471,7 @@ li.commit { @@ -471,3 +471,7 @@ li.commit {
471 } 471 }
472 } 472 }
473 } 473 }
  474 +
  475 +.commit-breadcrumb {
  476 + padding: 0;
  477 +}
app/views/projects/commits/show.html.haml
1 = render "head" 1 = render "head"
2 2
3 - if @path.present? 3 - if @path.present?
4 - %ul.breadcrumb 4 + %ul.breadcrumb.commit-breadcrumb
5 %li.light 5 %li.light
6 History for 6 History for
7 = commits_breadcrumbs 7 = commits_breadcrumbs
app/views/projects/merge_requests/edit.html.haml
1 %h3.page-title 1 %h3.page-title
2 - = "Edit merge request #{@merge_request.id}" 2 + = "Edit merge request ##{@merge_request.id}"
3 %hr 3 %hr
4 = render 'form' 4 = render 'form'
app/views/projects/merge_requests/show/_how_to_merge.html.haml
1 %div#modal_merge_info.modal.hide 1 %div#modal_merge_info.modal.hide
2 .modal-header 2 .modal-header
3 - %a.close{href: "#"} × 3 + %a.close{href: "#", "data-dismiss" => "modal"} ×
4 %h3 How To Merge 4 %h3 How To Merge
5 .modal-body 5 .modal-body
6 %p 6 %p
app/views/projects/merge_requests/show/_mr_accept.html.haml
@@ -11,7 +11,8 @@ @@ -11,7 +11,8 @@
11 %p 11 %p
12 You can accept this request automatically. 12 You can accept this request automatically.
13 If you still want to do it manually - 13 If you still want to do it manually -
14 - %strong= link_to "click here", "#", class: "how_to_merge_link vlink", title: "How To Merge" 14 + %strong
  15 + = link_to "click here", "#modal_merge_info", class: "how_to_merge_link vlink", title: "How To Merge", "data-toggle" => "modal"
15 for instructions 16 for instructions
16 .accept_group 17 .accept_group
17 = f.submit "Accept Merge Request", class: "btn btn-create accept_merge_request" 18 = f.submit "Accept Merge Request", class: "btn btn-create accept_merge_request"
@@ -31,7 +32,7 @@ @@ -31,7 +32,7 @@
31 .automerge_widget.cannot_be_merged{style: "display:none"} 32 .automerge_widget.cannot_be_merged{style: "display:none"}
32 .alert.alert-disabled 33 .alert.alert-disabled
33 %span 34 %span
34 - = link_to "Show how to merge", "#", class: "how_to_merge_link btn btn-small padded", title: "How To Merge" 35 + = link_to "Show how to merge", "#modal_merge_info", class: "how_to_merge_link btn btn-small padded", title: "How To Merge", "data-toggle" => "modal"
35   36  
36 %strong This request can't be merged with GitLab. You should do it manually 37 %strong This request can't be merged with GitLab. You should do it manually
37 38