git clone panel available on files tab too
This commit is contained in:
parent
8ca0b75d05
commit
f557686eb2
|
@ -14,3 +14,12 @@ function Projects() {
|
|||
|
||||
disableButtonIfEmtpyField("#project_name", ".project-submit")
|
||||
}
|
||||
|
||||
function initGitCloneSwitcher() {
|
||||
var link_sel = ".project_clone_holder button";
|
||||
$(link_sel).bind("click", function(e) {
|
||||
$(link_sel).removeClass("active");
|
||||
$(this).addClass("active");
|
||||
$("#project_clone").val($(this).attr("data-clone"));
|
||||
})
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* ===================================
|
||||
* Contain 3 main UI block elements:
|
||||
* Contain 3 main UI block elements:
|
||||
* .main_box - for show pages
|
||||
* .ui-box - for simple block & widgets
|
||||
* ===================================
|
||||
|
|
|
@ -75,17 +75,21 @@
|
|||
padding: 4px 7px;
|
||||
border: 1px solid #CCC;
|
||||
margin-bottom:5px;
|
||||
input[type=text] {
|
||||
}
|
||||
|
||||
.project_clone_holder {
|
||||
input[type="text"] {
|
||||
border: 1px solid #BBB;
|
||||
box-shadow: none;
|
||||
}
|
||||
}
|
||||
|
||||
.save-project-loader {
|
||||
img {
|
||||
.save-project-loader {
|
||||
img {
|
||||
margin-top:50px;
|
||||
margin-bottom:50px;
|
||||
}
|
||||
h3 {
|
||||
h3 {
|
||||
@extend .page_title;
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
})
|
||||
|
|
|
@ -7,4 +7,13 @@
|
|||
%li{class: "#{'active' if (controller.controller_name == "refs") }"}
|
||||
= link_to tree_project_ref_path(@project, @ref) do
|
||||
Source
|
||||
%li.right
|
||||
.input-prepend.project_clone_holder
|
||||
%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"
|
||||
|
||||
:javascript
|
||||
$(function(){
|
||||
initGitCloneSwitcher();
|
||||
})
|
||||
|
|
|
@ -6,5 +6,5 @@
|
|||
|
||||
// Load last commit log for each file in tree
|
||||
$('#tree-slider').waitForImages(function() {
|
||||
ajaxGet('#{@logs_path}');
|
||||
ajaxGet('#{@logs_path}');
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue