diff options
author | Jacob Schatz <jschatz1@gmail.com> | 2015-12-19 01:12:47 +0300 |
---|---|---|
committer | Jacob Schatz <jacobschatz@Jacobs-MBP.fios-router.home> | 2015-12-23 20:26:50 +0300 |
commit | f56783e5244c8199dc30fb8374a96d8e5d96549c (patch) | |
tree | 0ecd840a232c7c7d566349ac4423a5ea97aa6f0e /app/views/shared/_clone_panel.html.haml | |
parent | 011a7a32978ea6cfc7857f9afa7f2f242a753634 (diff) |
adds dropdown for cloning
Diffstat (limited to 'app/views/shared/_clone_panel.html.haml')
-rw-r--r-- | app/views/shared/_clone_panel.html.haml | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/app/views/shared/_clone_panel.html.haml b/app/views/shared/_clone_panel.html.haml index edb5778f424..d6fa2ea6a66 100644 --- a/app/views/shared/_clone_panel.html.haml +++ b/app/views/shared/_clone_panel.html.haml @@ -1,10 +1,26 @@ - project = project || @project -.git-clone-holder.input-group - .input-group-addon.git-protocols + +.git-clone-holder + .btn-group.clone-options + %a.clone-dropdown-btn.btn{href: '#', 'data-toggle' => 'dropdown'} + %span SSH + = icon('angle-down') + %ul.dropdown-menu.dropdown-menu-right.clone-options-dropdown + %li + %a{href: '#'} + SSH + %li + %a{href: '#'} + HTTPS + + = text_field_tag :project_clone, default_url_to_repo(project), class: "js-select-on-focus form-control", readonly: true .input-group-btn - = ssh_clone_button(project) - .input-group-btn - = http_clone_button(project) - = text_field_tag :project_clone, default_url_to_repo(project), class: "js-select-on-focus form-control", readonly: true - .input-group-btn - = clipboard_button(clipboard_target: '#project_clone') + = clipboard_button(clipboard_target: '#project_clone') + +:javascript + $('ul.clone-options-dropdown a').on('click',function(e){ + e.preventDefault(); + var $this = $(this); + $('a.clone-dropdown-btn span').text($this.text()); + console.log("got it",$(this).text()); + }); |