Update the projects js file to coffeescript; refactor the clone panel switcher
This commit is contained in:
parent
c1ff89fa2a
commit
7e76610d0a
4 changed files with 18 additions and 45 deletions
|
@ -36,16 +36,3 @@
|
|||
- if can? current_user, :admin_project, @project
|
||||
.prepend-top-20
|
||||
= link_to 'Remove project', @project, confirm: 'Are you sure?', method: :delete, class: "btn danger right"
|
||||
|
||||
|
||||
|
||||
: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"));
|
||||
})
|
||||
})
|
||||
|
||||
|
|
|
@ -2,8 +2,3 @@
|
|||
= render 'clone_panel'
|
||||
= render "events/event_last_push", event: @last_push
|
||||
.content_list= render @events
|
||||
|
||||
:javascript
|
||||
$(function(){
|
||||
initGitCloneSwitcher();
|
||||
})
|
||||
|
|
|
@ -12,8 +12,3 @@
|
|||
%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();
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue