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
Hide 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 {
...
@@ -44,7 +44,8 @@ export default {
},
},
selected
:
{
selected
:
{
type
:
Object
,
type
:
Object
,
required
:
true
,
required
:
false
,
default
:
()
=>
({}),
},
},
wrapperClass
:
{
wrapperClass
:
{
type
:
String
,
type
:
String
,
...
@@ -62,25 +63,24 @@ export default {
...
@@ -62,25 +63,24 @@ export default {
},
},
},
},
watch
:
{
watch
:
{
selected
:
{
selected
()
{
handler
()
{
this
.
initSelect
();
this
.
initSelect
();
},
deep
:
true
,
},
},
},
},
methods
:
{
methods
:
{
initSelect
()
{
initSelect
()
{
new
UsersSelect
(
null
,
this
.
$refs
.
dropdown
,
{
this
.
$nextTick
(()
=>
{
handleClick
:
this
.
selectUser
,
new
UsersSelect
(
null
,
this
.
$refs
.
dropdown
,
{
handleClick
:
this
.
selectUser
,
});
});
});
},
},
selectUser
(
user
,
isMarking
)
{
selectUser
(
user
,
isMarking
)
{
debugger
if
(
isMarking
)
{
if
(
user
.
id
||
isMarking
)
{
gl
.
issueBoards
.
BoardsStore
.
boardConfig
.
assignee
=
user
;
gl
.
issueBoards
.
BoardsStore
.
boardConfig
.
assignee
=
user
;
}
else
{
}
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 {
...
@@ -141,12 +141,12 @@ export default {
<button
<button
class=
"dropdown-menu-toggle wide"
class=
"dropdown-menu-toggle wide"
ref=
"dropdown"
ref=
"dropdown"
data-current-user=
"tru
e"
:data-field-name=
"fieldNam
e"
:data-dropdown-title=
"placeholderText"
:data-dropdown-title=
"placeholderText"
:data-any-user=
"anyUserText"
:data-any-user=
"anyUserText"
:data-group-id=
"groupId"
:data-group-id=
"groupId"
:data-project-id=
"projectId"
:data-project-id=
"projectId"
:data-selected=
"
board.assignee
.id"
:data-selected=
"
selected
.id"
data-toggle=
"dropdown"
data-toggle=
"dropdown"
aria-expanded=
"false"
aria-expanded=
"false"
type=
"button"
type=
"button"
...
...
app/assets/javascripts/users_select.js
View file @
60ca1167
...
@@ -377,9 +377,9 @@ function UsersSelect(currentUser, els, options = {}) {
...
@@ -377,9 +377,9 @@ function UsersSelect(currentUser, els, options = {}) {
},
},
multiSelect
:
$dropdown
.
hasClass
(
'
js-multiselect
'
),
multiSelect
:
$dropdown
.
hasClass
(
'
js-multiselect
'
),
inputMeta
:
$dropdown
.
data
(
'
input-meta
'
),
inputMeta
:
$dropdown
.
data
(
'
input-meta
'
),
clicked
:
function
(
clickEvent
)
{
clicked
:
function
(
options
)
{
const
{
$el
,
e
,
isMarking
}
=
clickEvent
;
const
{
$el
,
e
,
isMarking
}
=
options
;
const
user
=
clickEvent
.
selectedObj
;
const
user
=
options
.
selectedObj
;
if
(
$dropdown
.
hasClass
(
'
js-multiselect
'
))
{
if
(
$dropdown
.
hasClass
(
'
js-multiselect
'
))
{
const
isActive
=
$el
.
hasClass
(
'
is-active
'
);
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