From a5a9cd304c10fe012df433e14053b973f7cfc749 Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Tue, 15 Dec 2015 15:55:28 -0500 Subject: [PATCH 1/2] Update CHANGELOG [ci skip] --- CHANGELOG | 2 -- 1 file changed, 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 7f9dfd98cd7..6ae1f8cbcde 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -62,8 +62,6 @@ v 8.2.3 - Update documentation for "Guest" permissions - Properly convert Emoji-only comments into Award Emojis - Enable devise paranoid mode to prevent user enumeration attack - -v 8.2.3 - Webhook payload has an added, modified and removed properties for each commit - Fix 500 error when creating a merge request that removes a submodule From f49ac5c8d3c3fbe9a75a31ace0cf7a0ed698ded2 Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Tue, 15 Dec 2015 16:11:01 -0500 Subject: [PATCH 2/2] Fix clipboard buttons on MR instructions and Commit#show --- app/assets/stylesheets/pages/merge_requests.scss | 2 +- app/helpers/button_helper.rb | 4 ++-- app/views/projects/commit/_commit_box.html.haml | 4 ++-- .../merge_requests/show/_how_to_merge.html.haml | 12 ++++++------ 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/app/assets/stylesheets/pages/merge_requests.scss b/app/assets/stylesheets/pages/merge_requests.scss index 502e9552acd..82effde0bf3 100644 --- a/app/assets/stylesheets/pages/merge_requests.scss +++ b/app/assets/stylesheets/pages/merge_requests.scss @@ -191,7 +191,7 @@ .btn-clipboard { @extend .pull-right; - margin-right: 18px; + margin-right: 20px; margin-top: 5px; position: absolute; right: 0; diff --git a/app/helpers/button_helper.rb b/app/helpers/button_helper.rb index 313b6dde910..ec0e3f409c1 100644 --- a/app/helpers/button_helper.rb +++ b/app/helpers/button_helper.rb @@ -10,8 +10,8 @@ module ButtonHelper # # => "" # # # Define the target element - # clipboard_button(clipboard_target: "#foo") - # # => "" + # clipboard_button(clipboard_target: "div#foo") + # # => "" # # See http://clipboardjs.com/#usage def clipboard_button(data = {}) diff --git a/app/views/projects/commit/_commit_box.html.haml b/app/views/projects/commit/_commit_box.html.haml index 634924db247..cd40bfafcc2 100644 --- a/app/views/projects/commit/_commit_box.html.haml +++ b/app/views/projects/commit/_commit_box.html.haml @@ -20,8 +20,8 @@ %p %span.light Commit - = link_to @commit.id, namespace_project_commit_path(@project.namespace, @project, @commit), class: "monospace", data: { clipboard_text: @commit.id } - = clipboard_button + = link_to @commit.id, namespace_project_commit_path(@project.namespace, @project, @commit), class: "monospace" + = clipboard_button(clipboard_text: @commit.id) .commit-info-row %span.light Authored by %strong diff --git a/app/views/projects/merge_requests/show/_how_to_merge.html.haml b/app/views/projects/merge_requests/show/_how_to_merge.html.haml index 98f0357ce4e..877cc3d744b 100644 --- a/app/views/projects/merge_requests/show/_how_to_merge.html.haml +++ b/app/views/projects/merge_requests/show/_how_to_merge.html.haml @@ -8,8 +8,8 @@ %p %strong Step 1. Fetch and check out the branch for this merge request - = clipboard_button - %pre.dark + = clipboard_button(clipboard_target: 'pre#merge-info-1') + %pre.dark#merge-info-1 - if @merge_request.for_fork? :preserve git fetch #{h @merge_request.source_project.http_url_to_repo} #{h @merge_request.source_branch} @@ -25,8 +25,8 @@ %p %strong Step 3. Merge the branch and fix any conflicts that come up - = clipboard_button - %pre.dark + = clipboard_button(clipboard_target: 'pre#merge-info-3') + %pre.dark#merge-info-3 - if @merge_request.for_fork? :preserve git checkout #{h @merge_request.target_branch} @@ -38,8 +38,8 @@ %p %strong Step 4. Push the result of the merge to GitLab - = clipboard_button - %pre.dark + = clipboard_button(clipboard_target: 'pre#merge-info-4') + %pre.dark#merge-info-4 :preserve git push origin #{h @merge_request.target_branch} - unless @merge_request.can_be_merged_by?(current_user)