diff options
author | Jacob Schatz <jschatz1@gmail.com> | 2015-12-19 01:24:43 +0300 |
---|---|---|
committer | Jacob Schatz <jacobschatz@Jacobs-MBP.fios-router.home> | 2015-12-23 20:26:50 +0300 |
commit | ea5fa54b2d1949a21503661b3fd5a25401bf110e (patch) | |
tree | d900fc2d3e2bcf5fe5f7139be740d7486091a5b8 /app/views/shared/_clone_panel.html.haml | |
parent | f56783e5244c8199dc30fb8374a96d8e5d96549c (diff) |
dropdown chooses right default
Diffstat (limited to 'app/views/shared/_clone_panel.html.haml')
-rw-r--r-- | app/views/shared/_clone_panel.html.haml | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/app/views/shared/_clone_panel.html.haml b/app/views/shared/_clone_panel.html.haml index d6fa2ea6a66..74e82af48c8 100644 --- a/app/views/shared/_clone_panel.html.haml +++ b/app/views/shared/_clone_panel.html.haml @@ -3,14 +3,15 @@ .git-clone-holder .btn-group.clone-options %a.clone-dropdown-btn.btn{href: '#', 'data-toggle' => 'dropdown'} - %span SSH + %span + = default_clone_protocol.upcase = icon('angle-down') %ul.dropdown-menu.dropdown-menu-right.clone-options-dropdown %li - %a{href: '#'} + %a{href: '#', "data-url" => @project.ssh_url_to_repo} SSH %li - %a{href: '#'} + %a{href: '#', "data-url" => @project.http_url_to_repo} HTTPS = text_field_tag :project_clone, default_url_to_repo(project), class: "js-select-on-focus form-control", readonly: true @@ -22,5 +23,5 @@ e.preventDefault(); var $this = $(this); $('a.clone-dropdown-btn span').text($this.text()); - console.log("got it",$(this).text()); + $('#project_clone').val($this.data('url')); }); |