Commit a9fba2cd0acf847bced02e5ff3673b41adca151a
1 parent
42fc32d8
Exists in
spb-stable
and in
3 other branches
Fix modal dialogs
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing
7 changed files
with
109 additions
and
117 deletions
Show diff stats
app/assets/stylesheets/generic/common.scss
app/assets/stylesheets/sections/merge_requests.scss
... | ... | @@ -15,29 +15,9 @@ |
15 | 15 | } |
16 | 16 | } |
17 | 17 | |
18 | - .accept_group { | |
19 | - float: left; | |
20 | - border: 1px solid #ADA; | |
21 | - padding: 2px; | |
22 | - @include border-radius(5px); | |
23 | - background: #CEB; | |
24 | - | |
25 | - .accept_merge_request { | |
26 | - font-size: 13px; | |
27 | - float: left; | |
28 | - } | |
29 | - .remove_branch_holder { | |
30 | - margin-left: 20px; | |
31 | - margin-right: 10px; | |
32 | - float: left; | |
33 | - } | |
34 | - label { | |
35 | - color: #444; | |
36 | - text-align: left | |
37 | - } | |
18 | + .accept-group { | |
38 | 19 | } |
39 | 20 | |
40 | - | |
41 | 21 | .how_to_merge_link { |
42 | 22 | @extend .primary; |
43 | 23 | } | ... | ... |
app/views/help/_shortcuts.html.haml
1 | 1 | #modal-shortcuts.modal.hide |
2 | - .modal-header | |
3 | - %a.close{href: "#", "data-dismiss" => "modal"} × | |
4 | - %h3 Keyboard Shortcuts | |
5 | - .modal-body | |
6 | - %h5 Global Shortcuts | |
7 | - %p | |
8 | - %span.label.label-inverse s | |
9 | - – | |
10 | - Focus Search | |
11 | - %p | |
12 | - %span.label.label-inverse ? | |
13 | - – | |
14 | - Show this dialog | |
2 | + .modal-dialog | |
3 | + .modal-content | |
4 | + .modal-header | |
5 | + %a.close{href: "#", "data-dismiss" => "modal"} × | |
6 | + %h3 Keyboard Shortcuts | |
7 | + .modal-body | |
8 | + %h5 Global Shortcuts | |
9 | + %p | |
10 | + %span.label.label-inverse s | |
11 | + – | |
12 | + Focus Search | |
13 | + %p | |
14 | + %span.label.label-inverse ? | |
15 | + – | |
16 | + Show this dialog | |
15 | 17 | |
16 | - %h5 Project Files browsing | |
17 | - %p | |
18 | - %span.label.label-inverse | |
19 | - %i.icon-arrow-up | |
20 | - – | |
21 | - Move selection up | |
22 | - %p | |
23 | - %span.label.label-inverse | |
24 | - %i.icon-arrow-down | |
25 | - – | |
26 | - Move selection down | |
27 | - %p | |
28 | - %span.label.label-inverse Enter | |
29 | - – | |
30 | - Open selection | |
18 | + %h5 Project Files browsing | |
19 | + %p | |
20 | + %span.label.label-inverse | |
21 | + %i.icon-arrow-up | |
22 | + – | |
23 | + Move selection up | |
24 | + %p | |
25 | + %span.label.label-inverse | |
26 | + %i.icon-arrow-down | |
27 | + – | |
28 | + Move selection down | |
29 | + %p | |
30 | + %span.label.label-inverse Enter | |
31 | + – | |
32 | + Open selection | ... | ... |
app/views/projects/blob/_remove.html.haml
1 | -%div#modal-remove-blob.modal.hide | |
2 | - .modal-header | |
3 | - %a.close{href: "#", "data-dismiss" => "modal"} × | |
4 | - %h3.page-title Remove #{@blob.name} | |
5 | - %p.light | |
6 | - From branch | |
7 | - %strong= @ref | |
1 | +#modal-remove-blob.modal.hide | |
2 | + .modal-dialog | |
3 | + .modal-content | |
4 | + .modal-header | |
5 | + %a.close{href: "#", "data-dismiss" => "modal"} × | |
6 | + %h3.page-title Remove #{@blob.name} | |
7 | + %p.light | |
8 | + From branch | |
9 | + %strong= @ref | |
8 | 10 | |
9 | - .modal-body | |
10 | - = form_tag project_blob_path(@project, @id), method: :delete do | |
11 | - .form-group.commit_message-group | |
12 | - = label_tag 'commit_message', class: "control-label" do | |
13 | - Commit message | |
14 | - .col-sm-10 | |
15 | - = text_area_tag 'commit_message', params[:commit_message], placeholder: "Removed this file because...", required: true, rows: 3 | |
16 | - .form-group | |
17 | - .col-sm-10 | |
18 | - = submit_tag 'Remove file', class: 'btn btn-remove' | |
19 | - = link_to "Cancel", '#', class: "btn btn-cancel", "data-dismiss" => "modal" | |
11 | + .modal-body | |
12 | + = form_tag project_blob_path(@project, @id), method: :delete do | |
13 | + .form-group.commit_message-group | |
14 | + = label_tag 'commit_message', class: "control-label" do | |
15 | + Commit message | |
16 | + .col-sm-10 | |
17 | + = text_area_tag 'commit_message', params[:commit_message], placeholder: "Removed this file because...", required: true, rows: 3 | |
18 | + .form-group | |
19 | + .col-sm-10 | |
20 | + = submit_tag 'Remove file', class: 'btn btn-remove' | |
21 | + = link_to "Cancel", '#', class: "btn btn-cancel", "data-dismiss" => "modal" | ... | ... |
app/views/projects/merge_requests/show/_how_to_merge.html.haml
1 | 1 | %div#modal_merge_info.modal.hide |
2 | - .modal-header | |
3 | - %a.close{href: "#", "data-dismiss" => "modal"} × | |
4 | - %h3 How to merge | |
5 | - .modal-body | |
6 | - - if @merge_request.for_fork? | |
7 | - - source_remote = @merge_request.source_project.namespace.nil? ? "source" :@merge_request.source_project.namespace.path | |
8 | - - target_remote = @merge_request.target_project.namespace.nil? ? "target" :@merge_request.target_project.namespace.path | |
9 | - %p | |
10 | - %strong Step 1. | |
11 | - Checkout target branch and get recent objects from GitLab | |
12 | - Assuming remote for #{@merge_request.target_project.path_with_namespace} is called #{target_remote} | |
13 | - remote for #{@merge_request.source_project_path} is called #{source_remote} | |
14 | - %pre.dark | |
15 | - :preserve | |
16 | - git checkout #{target_remote} #{@merge_request.target_branch} | |
17 | - git fetch #{source_remote} | |
18 | - %p | |
19 | - %strong Step 2. | |
20 | - Merge source branch into target branch and push changes to GitLab | |
21 | - %pre.dark | |
22 | - :preserve | |
23 | - git merge #{source_remote}/#{@merge_request.source_branch} | |
24 | - git push #{target_remote} #{@merge_request.target_branch} | |
25 | - - else | |
26 | - %p | |
27 | - %strong Step 1. | |
28 | - Checkout target branch and get recent objects from GitLab | |
29 | - %pre.dark | |
30 | - :preserve | |
31 | - git checkout #{@merge_request.target_branch} | |
32 | - git fetch origin | |
33 | - %p | |
34 | - %strong Step 2. | |
35 | - Merge source branch into target branch and push changes to GitLab | |
36 | - %pre.dark | |
37 | - :preserve | |
38 | - git merge origin/#{@merge_request.source_branch} | |
39 | - git push origin #{@merge_request.target_branch} | |
2 | + .modal-dialog | |
3 | + .modal-content | |
4 | + .modal-header | |
5 | + %a.close{href: "#", "data-dismiss" => "modal"} × | |
6 | + %h3 How to merge | |
7 | + .modal-body | |
8 | + - if @merge_request.for_fork? | |
9 | + - source_remote = @merge_request.source_project.namespace.nil? ? "source" :@merge_request.source_project.namespace.path | |
10 | + - target_remote = @merge_request.target_project.namespace.nil? ? "target" :@merge_request.target_project.namespace.path | |
11 | + %p | |
12 | + %strong Step 1. | |
13 | + Checkout target branch and get recent objects from GitLab | |
14 | + Assuming remote for #{@merge_request.target_project.path_with_namespace} is called #{target_remote} | |
15 | + remote for #{@merge_request.source_project_path} is called #{source_remote} | |
16 | + %pre.dark | |
17 | + :preserve | |
18 | + git checkout #{target_remote} #{@merge_request.target_branch} | |
19 | + git fetch #{source_remote} | |
20 | + %p | |
21 | + %strong Step 2. | |
22 | + Merge source branch into target branch and push changes to GitLab | |
23 | + %pre.dark | |
24 | + :preserve | |
25 | + git merge #{source_remote}/#{@merge_request.source_branch} | |
26 | + git push #{target_remote} #{@merge_request.target_branch} | |
27 | + - else | |
28 | + %p | |
29 | + %strong Step 1. | |
30 | + Checkout target branch and get recent objects from GitLab | |
31 | + %pre.dark | |
32 | + :preserve | |
33 | + git checkout #{@merge_request.target_branch} | |
34 | + git fetch origin | |
35 | + %p | |
36 | + %strong Step 2. | |
37 | + Merge source branch into target branch and push changes to GitLab | |
38 | + %pre.dark | |
39 | + :preserve | |
40 | + git merge origin/#{@merge_request.source_branch} | |
41 | + git push origin #{@merge_request.target_branch} | |
40 | 42 | |
41 | 43 | |
42 | 44 | :javascript | ... | ... |
app/views/projects/merge_requests/show/_mr_accept.html.haml
... | ... | @@ -14,7 +14,7 @@ |
14 | 14 | %strong |
15 | 15 | = link_to "click here", "#modal_merge_info", class: "how_to_merge_link vlink", title: "How To Merge", "data-toggle" => "modal" |
16 | 16 | for instructions |
17 | - .accept_group | |
17 | + .accept-group | |
18 | 18 | = f.submit "Accept Merge Request", class: "btn btn-create accept_merge_request" |
19 | 19 | - unless @merge_request.disallow_source_branch_removal? |
20 | 20 | .remove_branch_holder | ... | ... |
app/views/projects/wikis/_new.html.haml
1 | 1 | %div#modal-new-wiki.modal.hide |
2 | - .modal-header | |
3 | - %a.close{href: "#", "data-dismiss" => "modal"} × | |
4 | - %h3.page-title New Wiki Page | |
5 | - .modal-body | |
6 | - = label_tag :new_wiki_path do | |
7 | - %span Page slug | |
8 | - = text_field_tag :new_wiki_path, nil, placeholder: 'how-to-setup', class: 'input-lg', required: true, :'data-wikis-path' => project_wikis_path(@project) | |
9 | - %p.hint | |
10 | - Please don't use spaces and slashes | |
11 | - .modal-footer | |
12 | - = link_to 'Build', '#', class: 'build-new-wiki btn btn-create' | |
2 | + .modal-dialog | |
3 | + .modal-content | |
4 | + .modal-header | |
5 | + %a.close{href: "#", "data-dismiss" => "modal"} × | |
6 | + %h3.page-title New Wiki Page | |
7 | + .modal-body | |
8 | + = label_tag :new_wiki_path do | |
9 | + %span Page slug | |
10 | + = text_field_tag :new_wiki_path, nil, placeholder: 'how-to-setup', class: 'input-lg', required: true, :'data-wikis-path' => project_wikis_path(@project) | |
11 | + %p.hint | |
12 | + Please don't use spaces and slashes | |
13 | + .modal-footer | |
14 | + = link_to 'Build', '#', class: 'build-new-wiki btn btn-create' | ... | ... |