Commit 91e112ffe2a2c16b3b5e2cd4ce032cb9fa769660
1 parent
e1ca9de0
Exists in
master
and in
4 other branches
Replace remote url on selection.
Showing
2 changed files
with
5 additions
and
2 deletions
Show diff stats
app/assets/javascripts/project.js.coffee
| ... | ... | @@ -35,6 +35,7 @@ $ -> |
| 35 | 35 | $('a, button', scope).removeClass 'active' |
| 36 | 36 | $(@).addClass 'active' |
| 37 | 37 | $('#project_clone', scope).val $(@).data 'clone' |
| 38 | + $(".clone").text("").append 'git remote add origin ' + $(@).data 'clone' | |
| 38 | 39 | |
| 39 | 40 | # Ref switcher |
| 40 | 41 | $('.project-refs-select').on 'change', -> | ... | ... |
app/views/projects/empty.html.haml
| ... | ... | @@ -29,7 +29,8 @@ |
| 29 | 29 | touch README |
| 30 | 30 | git add README |
| 31 | 31 | git commit -m 'first commit' |
| 32 | - git remote add origin #{@project.url_to_repo} | |
| 32 | + %span.clone= "git remote add origin #{@project.url_to_repo}" | |
| 33 | + :preserve | |
| 33 | 34 | git push -u origin master |
| 34 | 35 | |
| 35 | 36 | %fieldset |
| ... | ... | @@ -37,7 +38,8 @@ |
| 37 | 38 | %pre.dark |
| 38 | 39 | :preserve |
| 39 | 40 | cd existing_git_repo |
| 40 | - git remote add origin #{@project.url_to_repo} | |
| 41 | + %span.clone= "git remote add origin #{@project.url_to_repo}" | |
| 42 | + :preserve | |
| 41 | 43 | git push -u origin master |
| 42 | 44 | |
| 43 | 45 | - if can? current_user, :remove_project, @project | ... | ... |