BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
637e64c2
Commit
637e64c2
authored
Nov 24, 2015
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up the Git protocol switcher JS
Also re-adds the `.clone` updating that was removed accidentally. Thanks, tests!
parent
1d80cd31
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
6 deletions
+14
-6
project.js.coffee
app/assets/javascripts/project.js.coffee
+14
-6
No files found.
app/assets/javascripts/project.js.coffee
View file @
637e64c2
class
@
Project
constructor
:
->
# Git clone panel switcher
cloneHolder
=
$
(
'.git-clone-holder'
)
if
cloneHolder
.
length
$
(
'.js-protocol-switch'
,
cloneHolder
).
click
->
$
(
'.js-protocol-switch'
,
cloneHolder
).
toggleClass
(
'active'
)
$
(
'#project_clone'
).
val
(
$
(
@
).
data
(
'clone'
))
# Git protocol switcher
$
(
'.js-protocol-switch'
).
click
->
return
if
$
(
@
).
hasClass
(
'active'
)
# Toggle 'active' for both buttons
$
(
'.js-protocol-switch'
).
toggleClass
(
'active'
)
url
=
$
(
@
).
data
(
'clone'
)
# Update the input field
$
(
'#project_clone'
).
val
(
url
)
# Update the command line instructions
$
(
'.clone'
).
text
(
url
)
# Ref switcher
$
(
'.project-refs-select'
).
on
'change'
,
->
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment