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
2f4bdefc
Commit
2f4bdefc
authored
Mar 11, 2016
by
Alfredo Sumaran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow to pass non-asynchronous data to GitLabDropdown
parent
8048d611
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
9 deletions
+18
-9
gl_dropdown.js.coffee
app/assets/javascripts/gl_dropdown.js.coffee
+18
-9
No files found.
app/assets/javascripts/gl_dropdown.js.coffee
View file @
2f4bdefc
...
...
@@ -83,15 +83,19 @@ class GitLabDropdown
search_fields
=
if
@
options
.
search
then
@
options
.
search
.
fields
else
[];
if
@
options
.
data
# Remote data
@
remote
=
new
GitLabDropdownRemote
@
options
.
data
,
{
dataType
:
@
options
.
dataType
,
beforeSend
:
@
toggleLoading
.
bind
(
@
)
success
:
(
data
)
=>
@
fullData
=
data
# If data is an array
if
_
.
isArray
@
options
.
data
@
parseData
@
options
.
data
else
# Remote data
@
remote
=
new
GitLabDropdownRemote
@
options
.
data
,
{
dataType
:
@
options
.
dataType
,
beforeSend
:
@
toggleLoading
.
bind
(
@
)
success
:
(
data
)
=>
@
fullData
=
data
@
parseData
@
fullData
}
@
parseData
@
fullData
}
# Init filiterable
if
@
options
.
filterable
...
...
@@ -204,7 +208,12 @@ class GitLabDropdown
else
selected
=
if
@
options
.
isSelected
then
@
options
.
isSelected
(
data
)
else
false
url
=
if
@
options
.
url
then
@
options
.
url
(
data
)
else
"#"
text
=
if
@
options
.
text
then
@
options
.
text
(
data
)
else
""
if
@
options
.
text
?
text
=
@
options
.
text
(
data
)
else
text
=
data
.
text
if
data
.
text
?
cssClass
=
""
;
if
selected
...
...
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