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
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
69789567
Commit
69789567
authored
Mar 26, 2016
by
Jacob Schatz
Committed by
Jacob Schatz
Mar 30, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
User selection from collapsed sidebar
parent
750cd5c0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
app/assets/javascripts/users_select.js.coffee
app/assets/javascripts/users_select.js.coffee
+17
-0
No files found.
app/assets/javascripts/users_select.js.coffee
View file @
69789567
...
...
@@ -17,6 +17,9 @@ class @UsersSelect
issueURL
=
$dropdown
.
data
(
'issueUpdate'
)
$selectbox
=
$dropdown
.
closest
(
'.selectbox'
)
$block
=
$selectbox
.
closest
(
'.block'
)
$gutterToggle
=
$block
.
closest
(
'aside'
)
.
find
(
'.gutter-toggle'
)
abilityName
=
$dropdown
.
data
(
'ability-name'
)
$value
=
$block
.
find
(
'.value'
)
$collapsedSidebar
=
$block
.
find
(
'.sidebar-collapsed-user'
)
...
...
@@ -27,6 +30,16 @@ class @UsersSelect
assignTo
(
@
currentUser
.
id
)
)
$block
.
on
(
'click'
,
'.author_link'
,
(
e
)
=>
e
.
preventDefault
()
$gutterToggle
.
trigger
(
'click'
)
$block
.
find
(
'.edit-link'
)
.
trigger
(
'click'
)
$block
.
addClass
(
'collapse-after-update'
)
)
assignTo
=
(
selected
)
->
data
=
{}
data
[
abilityName
]
=
{}
...
...
@@ -54,6 +67,10 @@ class @UsersSelect
avatar
:
''
$value
.
html
(
assigneeTemplate
(
user
))
$collapsedSidebar
.
html
(
collapsedAssigneeTemplate
(
user
))
if
$block
.
hasClass
(
'collapse-after-update'
)
$block
.
removeClass
(
'collapse-after-update'
)
$gutterToggle
.
trigger
(
'click'
)
collapsedAssigneeTemplate
=
_
.
template
(
'<% if( avatar ) { %>
...
...
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