dropdown chooses right default
This commit is contained in:
parent
f56783e524
commit
ea5fa54b2d
1 changed files with 5 additions and 4 deletions
|
@ -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'));
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue