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
a69fd293
Commit
a69fd293
authored
Mar 30, 2017
by
Clement Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[skip ci] refactor function parameters
parent
bb29b79c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
3 deletions
+15
-3
app/assets/javascripts/users_select.js
app/assets/javascripts/users_select.js
+6
-1
app/assets/javascripts/vue_sidebar_assignees/stores/sidebar_assignees_store.js
...s/vue_sidebar_assignees/stores/sidebar_assignees_store.js
+3
-1
app/views/shared/issuable/_sidebar.html.haml
app/views/shared/issuable/_sidebar.html.haml
+6
-1
No files found.
app/assets/javascripts/users_select.js
View file @
a69fd293
...
...
@@ -279,7 +279,12 @@ import Vue from 'vue';
});
}
else
if
(
isActive
)
{
// user selected
gl
.
sidebarAssigneesOptions
.
assignees
.
addUser
(
user
.
id
,
user
.
name
,
user
.
username
,
user
.
avatar_url
);
gl
.
sidebarAssigneesOptions
.
assignees
.
addUser
({
id
:
user
.
id
,
name
:
user
.
name
,
username
:
user
.
username
,
avatarUrl
:
user
.
avatar_url
});
// Remove unassigned selection (if it was previously selected)
const
unassignedSelected
=
$dropdown
.
closest
(
'
.selectbox
'
)
...
...
app/assets/javascripts/vue_sidebar_assignees/stores/sidebar_assignees_store.js
View file @
a69fd293
...
...
@@ -12,7 +12,9 @@ export default class SidebarAssigneesStore {
this
.
editable
=
editable
;
}
addUser
(
id
,
name
=
''
,
username
=
''
,
avatarUrl
=
''
,
saved
=
false
)
{
addUser
(
user
,
saved
=
false
)
{
const
{
id
,
name
,
username
,
avatarUrl
}
=
user
;
this
.
users
.
push
({
id
,
name
,
...
...
app/views/shared/issuable/_sidebar.html.haml
View file @
a69fd293
...
...
@@ -217,7 +217,12 @@
-
issuable
.
assignees
.
each
do
|
assignee
|
:javascript
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
gl
.
sidebarAssigneesOptions
.
assignees
.
addUser
(
parseInt
(
"
#{
assignee
.
id
}
"
,
10
),
"
#{
assignee
.
name
}
"
,
"
#{
assignee
.
username
}
"
,
"
#{
assignee
.
avatar_url
}
"
,
true
);
gl
.
sidebarAssigneesOptions
.
assignees
.
addUser
({
id
:
parseInt
(
"
#{
assignee
.
id
}
"
,
10
),
name
:
"
#{
assignee
.
name
}
"
,
username
:
"
#{
assignee
.
username
}
"
,
avatarUrl
:
"
#{
assignee
.
avatar_url
}
"
},
true
);
});
:javascript
...
...
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