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
60ca1167
Commit
60ca1167
authored
Oct 06, 2017
by
Simon Knox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use handleClick properly for users select
parent
117f9050
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
16 deletions
+16
-16
app/assets/javascripts/boards/components/user_select.vue
app/assets/javascripts/boards/components/user_select.vue
+13
-13
app/assets/javascripts/users_select.js
app/assets/javascripts/users_select.js
+3
-3
No files found.
app/assets/javascripts/boards/components/user_select.vue
View file @
60ca1167
...
...
@@ -44,7 +44,8 @@ export default {
},
selected
:
{
type
:
Object
,
required
:
true
,
required
:
false
,
default
:
()
=>
({}),
},
wrapperClass
:
{
type
:
String
,
...
...
@@ -62,25 +63,24 @@ export default {
},
},
watch
:
{
selected
:
{
handler
()
{
selected
()
{
this
.
initSelect
();
},
deep
:
true
,
},
},
methods
:
{
initSelect
()
{
this
.
$nextTick
(()
=>
{
new
UsersSelect
(
null
,
this
.
$refs
.
dropdown
,
{
handleClick
:
this
.
selectUser
,
});
});
},
selectUser
(
user
,
isMarking
)
{
debugger
if
(
user
.
id
||
isMarking
)
{
if
(
isMarking
)
{
gl
.
issueBoards
.
BoardsStore
.
boardConfig
.
assignee
=
user
;
}
else
{
gl
.
issueBoards
.
BoardsStore
.
boardConfig
.
assignee
=
{};
// correctly select "unassigned" in Assignee dropdown
gl
.
issueBoards
.
BoardsStore
.
boardConfig
.
assignee
=
{
id
:
undefined
};
}
},
},
...
...
@@ -141,12 +141,12 @@ export default {
<button
class=
"dropdown-menu-toggle wide"
ref=
"dropdown"
data-current-user=
"tru
e"
:data-field-name=
"fieldNam
e"
:data-dropdown-title=
"placeholderText"
:data-any-user=
"anyUserText"
:data-group-id=
"groupId"
:data-project-id=
"projectId"
:data-selected=
"
board.assignee
.id"
:data-selected=
"
selected
.id"
data-toggle=
"dropdown"
aria-expanded=
"false"
type=
"button"
...
...
app/assets/javascripts/users_select.js
View file @
60ca1167
...
...
@@ -377,9 +377,9 @@ function UsersSelect(currentUser, els, options = {}) {
},
multiSelect
:
$dropdown
.
hasClass
(
'
js-multiselect
'
),
inputMeta
:
$dropdown
.
data
(
'
input-meta
'
),
clicked
:
function
(
clickEvent
)
{
const
{
$el
,
e
,
isMarking
}
=
clickEvent
;
const
user
=
clickEvent
.
selectedObj
;
clicked
:
function
(
options
)
{
const
{
$el
,
e
,
isMarking
}
=
options
;
const
user
=
options
.
selectedObj
;
if
(
$dropdown
.
hasClass
(
'
js-multiselect
'
))
{
const
isActive
=
$el
.
hasClass
(
'
is-active
'
);
...
...
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