diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 11:27:35 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 11:27:35 +0300 |
commit | 7e9c479f7de77702622631cff2628a9c8dcbc627 (patch) | |
tree | c8f718a08e110ad7e1894510980d2155a6549197 /app/assets/javascripts/projects/commit_box | |
parent | e852b0ae16db4052c1c567d9efa4facc81146e88 (diff) |
Add latest changes from gitlab-org/gitlab@13-6-stable-eev13.6.0-rc42
Diffstat (limited to 'app/assets/javascripts/projects/commit_box')
-rw-r--r-- | app/assets/javascripts/projects/commit_box/info/index.js | 3 | ||||
-rw-r--r-- | app/assets/javascripts/projects/commit_box/info/init_details_button.js | 11 |
2 files changed, 14 insertions, 0 deletions
diff --git a/app/assets/javascripts/projects/commit_box/info/index.js b/app/assets/javascripts/projects/commit_box/info/index.js index 352ac39f3c4..254d178f013 100644 --- a/app/assets/javascripts/projects/commit_box/info/index.js +++ b/app/assets/javascripts/projects/commit_box/info/index.js @@ -1,4 +1,5 @@ import { loadBranches } from './load_branches'; +import { initDetailsButton } from './init_details_button'; import { fetchCommitMergeRequests } from '~/commit_merge_requests'; import MiniPipelineGraph from '~/mini_pipeline_graph_dropdown'; @@ -15,4 +16,6 @@ export const initCommitBoxInfo = (containerSelector = '.js-commit-box-info') => new MiniPipelineGraph({ container: '.js-commit-pipeline-graph', }).bindEvents(); + + initDetailsButton(); }; diff --git a/app/assets/javascripts/projects/commit_box/info/init_details_button.js b/app/assets/javascripts/projects/commit_box/info/init_details_button.js new file mode 100644 index 00000000000..032fbf5316a --- /dev/null +++ b/app/assets/javascripts/projects/commit_box/info/init_details_button.js @@ -0,0 +1,11 @@ +import $ from 'jquery'; + +export const initDetailsButton = () => { + $('body').on('click', '.js-details-expand', function expand(e) { + e.preventDefault(); + $(this) + .next('.js-details-content') + .removeClass('hide'); + $(this).hide(); + }); +}; |