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
cb62eca8
Commit
cb62eca8
authored
Apr 26, 2017
by
Clement Ho
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'multiple-assignees-fe-sidebar' into multiple-assignees-issue-board-sidebar
parents
f3802ae1
7c022ae7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
1 deletion
+18
-1
app/assets/javascripts/sidebar/stores/sidebar_store.js
app/assets/javascripts/sidebar/stores/sidebar_store.js
+1
-0
app/assets/javascripts/users_select.js
app/assets/javascripts/users_select.js
+16
-0
app/views/shared/issuable/_sidebar.html.haml
app/views/shared/issuable/_sidebar.html.haml
+1
-1
No files found.
app/assets/javascripts/sidebar/stores/sidebar_store.js
View file @
cb62eca8
...
@@ -23,6 +23,7 @@ export default class SidebarStore {
...
@@ -23,6 +23,7 @@ export default class SidebarStore {
this
.
renderedUsers
=
data
.
assignees
.
map
(
a
=>
{
this
.
renderedUsers
=
data
.
assignees
.
map
(
a
=>
{
a
.
avatarUrl
=
a
.
avatar_url
;
a
.
avatarUrl
=
a
.
avatar_url
;
delete
a
.
avatar_url
;
delete
a
.
avatar_url
;
return
a
;
return
a
;
});
});
...
...
app/assets/javascripts/users_select.js
View file @
cb62eca8
...
@@ -285,6 +285,22 @@ import eventHub from './sidebar/event_hub';
...
@@ -285,6 +285,22 @@ import eventHub from './sidebar/event_hub';
const
previouslySelected
=
$dropdown
.
closest
(
'
.selectbox
'
)
const
previouslySelected
=
$dropdown
.
closest
(
'
.selectbox
'
)
.
find
(
"
input[name='
"
+
(
$dropdown
.
data
(
'
field-name
'
))
+
"
'][value!=0]
"
);
.
find
(
"
input[name='
"
+
(
$dropdown
.
data
(
'
field-name
'
))
+
"
'][value!=0]
"
);
// Enables support for limiting the number of users selected
// Automatically removes the first on the list if more users are selected
const
maxSelect
=
$dropdown
.
data
(
'
max-select
'
);
if
(
maxSelect
)
{
const
selected
=
getSelected
();
if
(
selected
.
length
>
maxSelect
)
{
const
firstSelectedId
=
selected
[
0
];
const
firstSelected
=
$dropdown
.
closest
(
'
.selectbox
'
)
.
find
(
`input[name='
${
$dropdown
.
data
(
'
field-name
'
)}
'][value=
${
firstSelectedId
}
]`
);
firstSelected
.
remove
();
eventHub
.
$emit
(
'
sidebar.removeUser
'
,
firstSelectedId
);
}
}
if
(
user
.
beforeDivider
&&
user
.
name
.
toLowerCase
()
===
'
unassigned
'
)
{
if
(
user
.
beforeDivider
&&
user
.
name
.
toLowerCase
()
===
'
unassigned
'
)
{
// Unassigned selected
// Unassigned selected
previouslySelected
.
each
((
index
,
element
)
=>
{
previouslySelected
.
each
((
index
,
element
)
=>
{
...
...
app/views/shared/issuable/_sidebar.html.haml
View file @
cb62eca8
...
@@ -65,7 +65,7 @@
...
@@ -65,7 +65,7 @@
-
options
[
:toggle_class
]
+=
' js-multiselect js-save-user-data'
-
options
[
:toggle_class
]
+=
' js-multiselect js-save-user-data'
-
options
[
:data
][
:field_name
]
=
"
#{
issuable
.
to_ability_name
}
[assignee_ids][]"
-
options
[
:data
][
:field_name
]
=
"
#{
issuable
.
to_ability_name
}
[assignee_ids][]"
-
options
[
:data
][
:multi_select
]
=
true
-
options
[
:data
][
:multi_select
]
=
true
-
options
[
:data
][
'dropdown-title'
]
=
'Select assignee(s)'
-
options
[
:data
][
'dropdown-title'
]
=
title
-
options
[
:data
][
'dropdown-header'
]
=
'Assignee(s)'
-
options
[
:data
][
'dropdown-header'
]
=
'Assignee(s)'
-
else
-
else
-
title
=
'Select assignee'
-
title
=
'Select assignee'
...
...
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