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 22 this.$('.show-all-commits').on 'click', =>
23 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 27 # Local jQuery finder
33 28 $: (selector) ->
... ...
app/assets/stylesheets/sections/commits.scss
... ... @@ -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 1 = render "head"
2 2  
3 3 - if @path.present?
4   - %ul.breadcrumb
  4 + %ul.breadcrumb.commit-breadcrumb
5 5 %li.light
6 6 History for
7 7 = commits_breadcrumbs
... ...
app/views/projects/merge_requests/edit.html.haml
1 1 %h3.page-title
2   - = "Edit merge request #{@merge_request.id}"
  2 + = "Edit merge request ##{@merge_request.id}"
3 3 %hr
4 4 = render 'form'
... ...
app/views/projects/merge_requests/show/_how_to_merge.html.haml
1 1 %div#modal_merge_info.modal.hide
2 2 .modal-header
3   - %a.close{href: "#"} ×
  3 + %a.close{href: "#", "data-dismiss" => "modal"} ×
4 4 %h3 How To Merge
5 5 .modal-body
6 6 %p
... ...
app/views/projects/merge_requests/show/_mr_accept.html.haml
... ... @@ -11,7 +11,8 @@
11 11 %p
12 12 You can accept this request automatically.
13 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 16 for instructions
16 17 .accept_group
17 18 = f.submit "Accept Merge Request", class: "btn btn-create accept_merge_request"
... ... @@ -31,7 +32,7 @@
31 32 .automerge_widget.cannot_be_merged{style: "display:none"}
32 33 .alert.alert-disabled
33 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 37 %strong This request can't be merged with GitLab. You should do it manually
37 38  
... ...