git clone panel available on files tab too

This commit is contained in:
randx 2012-09-03 22:30:14 +03:00
parent 8ca0b75d05
commit f557686eb2
7 changed files with 31 additions and 14 deletions

View file

@ -3,8 +3,8 @@
.span7
.form-horizontal
.input-prepend.project_clone_holder
= link_to "SSH", "#", class: "btn small active", :"data-clone" => @project.ssh_url_to_repo
= link_to "HTTP", "#", class: "btn small", :"data-clone" => @project.http_url_to_repo
%button{class: "btn small active", :"data-clone" => @project.ssh_url_to_repo} SSH
%button{class: "btn small", :"data-clone" => @project.http_url_to_repo} HTTP
= text_field_tag :project_clone, @project.url_to_repo, class: "one_click_select span5"
.span4.right
.right

View file

@ -5,10 +5,5 @@
:javascript
$(function(){
var link_sel = ".project_clone_holder a";
$(link_sel).bind("click", function() {
$(link_sel).removeClass("active");
$(this).addClass("active");
$("#project_clone").val($(this).attr("data-clone"));
})
initGitCloneSwitcher();
})