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
b5ef1fd1
Commit
b5ef1fd1
authored
May 02, 2017
by
Clement Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[skip ci] Fix assign yourself bug
parent
f2f7ef9d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
5 deletions
+23
-5
app/assets/javascripts/gl_dropdown.js
app/assets/javascripts/gl_dropdown.js
+22
-1
app/assets/javascripts/users_select.js
app/assets/javascripts/users_select.js
+1
-4
No files found.
app/assets/javascripts/gl_dropdown.js
View file @
b5ef1fd1
...
...
@@ -446,15 +446,36 @@ GitLabDropdown = (function() {
}
};
GitLabDropdown
.
prototype
.
filteredFullData
=
function
()
{
return
this
.
fullData
.
filter
(
r
=>
typeof
r
===
'
object
'
&&
!
Object
.
prototype
.
hasOwnProperty
.
call
(
r
,
'
beforeDivider
'
)
&&
!
Object
.
prototype
.
hasOwnProperty
.
call
(
r
,
'
header
'
)
);
};
GitLabDropdown
.
prototype
.
opened
=
function
(
e
)
{
var
contentHtml
;
this
.
resetRows
();
this
.
addArrowKeyEvent
();
const
dropdownToggle
=
this
.
dropdown
.
find
(
'
.dropdown-menu-toggle
'
);
const
hasFilterBulkUpdate
=
dropdownToggle
.
hasClass
(
'
js-filter-bulk-update
'
);
const
hasMultiSelect
=
dropdownToggle
.
hasClass
(
'
js-multiselect
'
);
// Makes indeterminate items effective
if
(
this
.
fullData
&&
this
.
dropdown
.
find
(
'
.dropdown-menu-toggle
'
).
hasClass
(
'
js-filter-bulk-update
'
)
)
{
if
(
this
.
fullData
&&
hasFilterBulkUpdate
)
{
this
.
parseData
(
this
.
fullData
);
}
// Process the data to make sure rendered data
// matches the correct layout
if
(
this
.
fullData
&&
hasMultiSelect
)
{
const
inputValue
=
this
.
filterInput
.
val
();
const
users
=
this
.
filteredFullData
();
this
.
options
.
processData
.
call
(
this
.
options
,
inputValue
,
users
,
this
.
parseData
.
bind
(
this
));
}
contentHtml
=
$
(
'
.dropdown-content
'
,
this
.
dropdown
).
html
();
if
(
this
.
remote
&&
contentHtml
===
""
)
{
this
.
remote
.
execute
();
...
...
app/assets/javascripts/users_select.js
View file @
b5ef1fd1
...
...
@@ -278,10 +278,7 @@ import eventHub from './sidebar/event_hub';
if
(
this
.
multiSelect
&&
inputValue
===
''
)
{
// Remove non-users from the fullData array
const
users
=
glDropdown
.
fullData
.
filter
(
r
=>
typeof
r
===
'
object
'
&&
!
Object
.
prototype
.
hasOwnProperty
.
call
(
r
,
'
beforeDivider
'
)
&&
!
Object
.
prototype
.
hasOwnProperty
.
call
(
r
,
'
header
'
)
);
const
users
=
glDropdown
.
filteredFullData
();
const
callback
=
glDropdown
.
parseData
.
bind
(
glDropdown
);
// Update the data model
...
...
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