diff options
author | Jose Ivan Vargas <jvargas@gitlab.com> | 2017-11-10 16:58:55 -0600 |
---|---|---|
committer | Jose Ivan Vargas <jvargas@gitlab.com> | 2017-11-27 09:19:39 -0600 |
commit | 81f2bdfccb6e72ac4b90e6ea24ce24c71e3074cb (patch) | |
tree | cc1eb83cc69d305776fc421808d9fa96497ddee0 /app/assets/javascripts/project.js | |
parent | 24fadd7c3d0a8f643e9df1c7ae3c1c7e88e8592e (diff) | |
download | gitlab-ce-81f2bdfccb6e72ac4b90e6ea24ce24c71e3074cb.tar.gz |
Removed tooltip from clone dropdown
Diffstat (limited to 'app/assets/javascripts/project.js')
-rw-r--r-- | app/assets/javascripts/project.js | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/app/assets/javascripts/project.js b/app/assets/javascripts/project.js index 36b6a5ed376..8d49ae2e712 100644 --- a/app/assets/javascripts/project.js +++ b/app/assets/javascripts/project.js @@ -17,6 +17,37 @@ export default class Project { $('a', $cloneOptions).on('click', (e) => { const $this = $(e.currentTarget); const url = $this.attr('href'); + const activeText = $this.find('.dropdown-menu-inner-title').text(); + + e.preventDefault(); + + $('.is-active', $cloneOptions).not($this).removeClass('is-active'); + $this.toggleClass('is-active'); + $projectCloneField.val(url); + $cloneBtnText.text(activeText); + + return $('.clone').text(url); + }); + // Ref switcher + this.initRefSwitcher(); + $('.project-refs-select').on('change', function() { + return $(this).parents('form').submit(); + }); + $('.hide-no-ssh-message').on('click', function(e) { + Cookies.set('hide_no_ssh_message', 'false'); + $(this).parents('.no-ssh-key-message').remove(); + return e.preventDefault(); + }); + $('.hide-no-password-message').on('click', function(e) { + Cookies.set('hide_no_password_message', 'false'); + $(this).parents('.no-password-message').remove(); + return e.preventDefault(); + }); + this.projectSelectDropdown(); + + $('a', $cloneOptions).on('click', (e) => { + const $this = $(e.currentTarget); + const url = $this.attr('href'); e.preventDefault(); |