diff options
author | Eric Eastwood <contact@ericeastwood.com> | 2017-04-06 16:36:38 +0000 |
---|---|---|
committer | Alfredo Sumaran <alfredo@gitlab.com> | 2017-04-06 16:36:38 +0000 |
commit | b42dc1a52b5687972262e634cad589345fe49373 (patch) | |
tree | 1786fb11cc0615674e2bc14338331d6e8ffc740f /app/assets/javascripts/blob | |
parent | 3f60fe1a6045bac777357aa0d962e1a11552468c (diff) | |
download | gitlab-ce-b42dc1a52b5687972262e634cad589345fe49373.tar.gz |
Linking to edit file directly
Diffstat (limited to 'app/assets/javascripts/blob')
-rw-r--r-- | app/assets/javascripts/blob/blob_fork_suggestion.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/app/assets/javascripts/blob/blob_fork_suggestion.js b/app/assets/javascripts/blob/blob_fork_suggestion.js new file mode 100644 index 00000000000..aa9a4e1c99a --- /dev/null +++ b/app/assets/javascripts/blob/blob_fork_suggestion.js @@ -0,0 +1,15 @@ +function BlobForkSuggestion(openButton, cancelButton, suggestionSection) { + if (openButton) { + openButton.addEventListener('click', () => { + suggestionSection.classList.remove('hidden'); + }); + } + + if (cancelButton) { + cancelButton.addEventListener('click', () => { + suggestionSection.classList.add('hidden'); + }); + } +} + +export default BlobForkSuggestion; |