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
c67d2f46
Commit
c67d2f46
authored
Sep 06, 2016
by
Alfredo Sumaran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fieldName can’t be a function
Restore changes introduced in
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/581
parent
e485e601
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
5 deletions
+2
-5
gl_dropdown.js
app/assets/javascripts/gl_dropdown.js
+2
-5
No files found.
app/assets/javascripts/gl_dropdown.js
View file @
c67d2f46
...
...
@@ -488,7 +488,7 @@
}
else
{
if
(
!
selected
)
{
value
=
this
.
options
.
id
?
this
.
options
.
id
(
data
)
:
data
.
id
;
fieldName
=
t
ypeof
this
.
options
.
fieldName
===
'function'
?
this
.
options
.
fieldName
()
:
t
his
.
options
.
fieldName
;
fieldName
=
this
.
options
.
fieldName
;
field
=
this
.
dropdown
.
parent
().
find
(
"input[name='"
+
fieldName
+
"'][value='"
+
value
+
"']"
);
if
(
field
.
length
)
{
...
...
@@ -546,6 +546,7 @@
GitLabDropdown
.
prototype
.
rowClicked
=
function
(
el
)
{
var
field
,
fieldName
,
groupName
,
isInput
,
selectedIndex
,
selectedObject
,
value
;
fieldName
=
this
.
options
.
fieldName
;
isInput
=
$
(
this
.
el
).
is
(
'input'
);
if
(
this
.
renderedData
)
{
groupName
=
el
.
data
(
'group'
);
...
...
@@ -557,7 +558,6 @@
selectedObject
=
this
.
renderedData
[
selectedIndex
];
}
}
fieldName
=
typeof
this
.
options
.
fieldName
===
'function'
?
this
.
options
.
fieldName
(
selectedObject
)
:
this
.
options
.
fieldName
;
value
=
this
.
options
.
id
?
this
.
options
.
id
(
selectedObject
,
el
)
:
selectedObject
.
id
;
if
(
isInput
)
{
field
=
$
(
this
.
el
);
...
...
@@ -609,9 +609,6 @@
if
(
this
.
options
.
inputId
!=
null
)
{
$input
.
attr
(
'id'
,
this
.
options
.
inputId
);
}
if
(
selectedObject
&&
selectedObject
.
type
)
{
$input
.
attr
(
'data-type'
,
selectedObject
.
type
);
}
return
this
.
dropdown
.
before
(
$input
);
};
...
...
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