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
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
35b3c709
Commit
35b3c709
authored
Mar 29, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed multiselect
parent
f8b5ff95
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
28 deletions
+6
-28
app/assets/javascripts/gl_dropdown.js.coffee
app/assets/javascripts/gl_dropdown.js.coffee
+1
-9
app/assets/javascripts/milestone_select.js.coffee
app/assets/javascripts/milestone_select.js.coffee
+5
-19
No files found.
app/assets/javascripts/gl_dropdown.js.coffee
View file @
35b3c709
...
@@ -284,6 +284,7 @@ class GitLabDropdown
...
@@ -284,6 +284,7 @@ class GitLabDropdown
selectedObject
=
@
renderedData
[
selectedIndex
]
selectedObject
=
@
renderedData
[
selectedIndex
]
value
=
if
@
options
.
id
then
@
options
.
id
(
selectedObject
,
el
)
else
selectedObject
.
id
value
=
if
@
options
.
id
then
@
options
.
id
(
selectedObject
,
el
)
else
selectedObject
.
id
field
=
@
dropdown
.
parent
().
find
(
"input[name='
#{
fieldName
}
'][value='
#{
value
}
']"
)
field
=
@
dropdown
.
parent
().
find
(
"input[name='
#{
fieldName
}
'][value='
#{
value
}
']"
)
if
el
.
hasClass
(
ACTIVE_CLASS
)
if
el
.
hasClass
(
ACTIVE_CLASS
)
el
.
removeClass
(
ACTIVE_CLASS
)
el
.
removeClass
(
ACTIVE_CLASS
)
field
.
remove
()
field
.
remove
()
...
@@ -292,13 +293,6 @@ class GitLabDropdown
...
@@ -292,13 +293,6 @@ class GitLabDropdown
if
@
options
.
toggleLabel
if
@
options
.
toggleLabel
$
(
@
el
).
find
(
".dropdown-toggle-text"
).
text
@
options
.
toggleLabel
$
(
@
el
).
find
(
".dropdown-toggle-text"
).
text
@
options
.
toggleLabel
else
else
fieldName
=
@
options
.
fieldName
selectedIndex
=
el
.
parent
().
index
()
if
@
renderedData
selectedObject
=
@
renderedData
[
selectedIndex
]
selectedObject
.
selected
=
true
value
=
if
@
options
.
id
then
@
options
.
id
(
selectedObject
,
el
)
else
selectedObject
.
id
if
!
value
?
if
!
value
?
field
.
remove
()
field
.
remove
()
...
@@ -321,8 +315,6 @@ class GitLabDropdown
...
@@ -321,8 +315,6 @@ class GitLabDropdown
.
attr
(
'id'
,
@
options
.
inputId
)
.
attr
(
'id'
,
@
options
.
inputId
)
@
dropdown
.
before
input
@
dropdown
.
before
input
@
dropdown
.
parent
().
find
(
"input[name='
#{
fieldName
}
']"
).
val
value
return
selectedObject
return
selectedObject
selectFirstRow
:
->
selectFirstRow
:
->
...
...
app/assets/javascripts/milestone_select.js.coffee
View file @
35b3c709
...
@@ -33,20 +33,6 @@ class @MilestoneSelect
...
@@ -33,20 +33,6 @@ class @MilestoneSelect
$
.
ajax
(
$
.
ajax
(
url
:
milestonesUrl
url
:
milestonesUrl
).
done
(
data
)
->
).
done
(
data
)
->
<<<<<<<
c9dea7761dc69ff38d101d06e0e636e1f3b2a0c4
if
$dropdown
.
hasClass
"js-extra-options"
if
showNo
data
.
unshift
(
id
:
'0'
title
:
'No Milestone'
)
if
showAny
data
.
unshift
(
isAny
:
true
title
:
'Any Milestone'
)
=======
extraOptions
=
[]
extraOptions
=
[]
if
showAny
if
showAny
extraOptions
.
push
(
extraOptions
.
push
(
...
@@ -68,11 +54,11 @@ class @MilestoneSelect
...
@@ -68,11 +54,11 @@ class @MilestoneSelect
name
:
'#upcoming'
name
:
'#upcoming'
title
:
'Upcoming'
title
:
'Upcoming'
)
)
>>>>>>>
Updated
to
only
include
upcoming
on
filters
if
data
.
length
>
2
if
extraOptions
.
length
>
2
data
.
splice
2
,
0
,
'divider'
extraOptions
.
push
'divider'
callback
(
data
)
callback
(
extraOptions
.
concat
(
data
))
filterable
:
true
filterable
:
true
search
:
search
:
fields
:
[
'title'
]
fields
:
[
'title'
]
...
@@ -99,7 +85,7 @@ class @MilestoneSelect
...
@@ -99,7 +85,7 @@ class @MilestoneSelect
if
$dropdown
.
hasClass
'js-filter-bulk-update'
if
$dropdown
.
hasClass
'js-filter-bulk-update'
return
return
if
$dropdown
.
hasClass
(
'js-filter-submit'
)
and
(
isIssueIndex
or
isMRIndex
)
if
$dropdown
.
hasClass
(
'js-filter-submit'
)
if
selected
.
name
?
if
selected
.
name
?
selectedMilestone
=
selected
.
name
selectedMilestone
=
selected
.
name
else
if
selected
.
title
?
else
if
selected
.
title
?
...
...
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