Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
afe9c03b
Commit
afe9c03b
authored
Nov 21, 2019
by
Utkarsh Gupta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove var from project.js
parent
1f8c149a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
app/assets/javascripts/pages/projects/project.js
app/assets/javascripts/pages/projects/project.js
+12
-12
No files found.
app/assets/javascripts/pages/projects/project.js
View file @
afe9c03b
/* eslint-disable func-names, no-
var, no-
return-assign */
/* eslint-disable func-names, no-return-assign */
import
$
from
'
jquery
'
;
import
Cookies
from
'
js-cookie
'
;
...
...
@@ -90,19 +90,19 @@ export default class Project {
}
static
initRefSwitcher
()
{
var
refListItem
=
document
.
createElement
(
'
li
'
);
var
refLink
=
document
.
createElement
(
'
a
'
);
const
refListItem
=
document
.
createElement
(
'
li
'
);
const
refLink
=
document
.
createElement
(
'
a
'
);
refLink
.
href
=
'
#
'
;
return
$
(
'
.js-project-refs-dropdown
'
).
each
(
function
()
{
var
$dropdown
=
$
(
this
);
var
selected
=
$dropdown
.
data
(
'
selected
'
);
var
fieldName
=
$dropdown
.
data
(
'
fieldName
'
);
var
shouldVisit
=
Boolean
(
$dropdown
.
data
(
'
visit
'
));
var
$form
=
$dropdown
.
closest
(
'
form
'
);
var
action
=
$form
.
attr
(
'
action
'
);
var
linkTarget
=
mergeUrlParams
(
serializeForm
(
$form
[
0
]),
action
);
const
$dropdown
=
$
(
this
);
const
selected
=
$dropdown
.
data
(
'
selected
'
);
const
fieldName
=
$dropdown
.
data
(
'
fieldName
'
);
const
shouldVisit
=
Boolean
(
$dropdown
.
data
(
'
visit
'
));
const
$form
=
$dropdown
.
closest
(
'
form
'
);
const
action
=
$form
.
attr
(
'
action
'
);
const
linkTarget
=
mergeUrlParams
(
serializeForm
(
$form
[
0
]),
action
);
return
$dropdown
.
glDropdown
({
data
(
term
,
callback
)
{
...
...
@@ -123,9 +123,9 @@ export default class Project {
inputFieldName
:
$dropdown
.
data
(
'
inputFieldName
'
),
fieldName
,
renderRow
(
ref
)
{
var
li
=
refListItem
.
cloneNode
(
false
);
const
li
=
refListItem
.
cloneNode
(
false
);
var
link
=
refLink
.
cloneNode
(
false
);
const
link
=
refLink
.
cloneNode
(
false
);
if
(
ref
===
selected
)
{
link
.
className
=
'
is-active
'
;
...
...
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