diff options
Diffstat (limited to 'app/assets/javascripts/projects/commit_box/info/init_details_button.js')
-rw-r--r-- | app/assets/javascripts/projects/commit_box/info/init_details_button.js | 8 |
1 files changed, 3 insertions, 5 deletions
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 index 833e946af5c..bc2c16b9e83 100644 --- a/app/assets/javascripts/projects/commit_box/info/init_details_button.js +++ b/app/assets/javascripts/projects/commit_box/info/init_details_button.js @@ -1,9 +1,7 @@ -import $ from 'jquery'; - export const initDetailsButton = () => { - $('body').on('click', '.js-details-expand', function expand(e) { + document.querySelector('.commit-info').addEventListener('click', function expand(e) { e.preventDefault(); - $(this).next('.js-details-content').removeClass('hide'); - $(this).hide(); + this.querySelector('.js-details-content').classList.remove('hide'); + this.querySelector('.js-details-expand').classList.add('gl-display-none'); }); }; |