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
cb619298
Commit
cb619298
authored
Mar 26, 2016
by
Jacob Schatz
Committed by
Jacob Schatz
Mar 30, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make changed values visible in minimized sidebar.
parent
7b2af874
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
25 deletions
+39
-25
app/assets/javascripts/labels_select.js.coffee
app/assets/javascripts/labels_select.js.coffee
+13
-7
app/assets/javascripts/milestone_select.js.coffee
app/assets/javascripts/milestone_select.js.coffee
+9
-13
app/assets/javascripts/users_select.js.coffee
app/assets/javascripts/users_select.js.coffee
+17
-5
No files found.
app/assets/javascripts/labels_select.js.coffee
View file @
cb619298
...
@@ -16,6 +16,7 @@ class @LabelsSelect
...
@@ -16,6 +16,7 @@ class @LabelsSelect
abilityName
=
$dropdown
.
data
(
'ability-name'
)
abilityName
=
$dropdown
.
data
(
'ability-name'
)
$selectbox
=
$dropdown
.
closest
(
'.selectbox'
)
$selectbox
=
$dropdown
.
closest
(
'.selectbox'
)
$block
=
$selectbox
.
closest
(
'.block'
)
$block
=
$selectbox
.
closest
(
'.block'
)
$sidebarCollapsedValue
=
$block
.
find
(
'.sidebar-collapsed-icon span'
)
$value
=
$block
.
find
(
'.value'
)
$value
=
$block
.
find
(
'.value'
)
$loading
=
$block
.
find
(
'.block-loading'
).
fadeOut
()
$loading
=
$block
.
find
(
'.block-loading'
).
fadeOut
()
...
@@ -151,13 +152,17 @@ class @LabelsSelect
...
@@ -151,13 +152,17 @@ class @LabelsSelect
$loading
.
fadeOut
()
$loading
.
fadeOut
()
$selectbox
.
hide
()
$selectbox
.
hide
()
data
.
issueURLSplit
=
issueURLSplit
data
.
issueURLSplit
=
issueURLSplit
if
not
data
.
labels
.
length
labelCount
=
0
template
=
labelNoneHTMLTemplate
()
if
data
.
labels
.
length
else
template
=
labelHTMLTemplate
(
data
)
template
=
labelHTMLTemplate
(
data
)
href
=
$value
labelCount
=
data
.
labels
.
length
.
show
()
else
.
html
(
template
)
template
=
labelNoneHTMLTemplate
()
$value
.
removeAttr
(
'style'
)
.
html
(
template
)
$sidebarCollapsedValue
.
text
(
labelCount
)
$value
$value
.
find
(
'a'
)
.
find
(
'a'
)
.
each
((
i
)
->
.
each
((
i
)
->
...
@@ -226,7 +231,8 @@ class @LabelsSelect
...
@@ -226,7 +231,8 @@ class @LabelsSelect
hidden
:
->
hidden
:
->
$selectbox
.
hide
()
$selectbox
.
hide
()
$value
.
show
()
# display:block overrides the hide-collapse rule
$value
.
removeAttr
(
'style'
)
if
$dropdown
.
hasClass
'js-multiselect'
if
$dropdown
.
hasClass
'js-multiselect'
saveLabelData
()
saveLabelData
()
...
...
app/assets/javascripts/milestone_select.js.coffee
View file @
cb619298
...
@@ -18,6 +18,7 @@ class @MilestoneSelect
...
@@ -18,6 +18,7 @@ class @MilestoneSelect
abilityName
=
$dropdown
.
data
(
'ability-name'
)
abilityName
=
$dropdown
.
data
(
'ability-name'
)
$selectbox
=
$dropdown
.
closest
(
'.selectbox'
)
$selectbox
=
$dropdown
.
closest
(
'.selectbox'
)
$block
=
$selectbox
.
closest
(
'.block'
)
$block
=
$selectbox
.
closest
(
'.block'
)
$sidebarCollapsedValue
=
$block
.
find
(
'.sidebar-collapsed-icon span'
)
$value
=
$block
.
find
(
'.value'
)
$value
=
$block
.
find
(
'.value'
)
$loading
=
$block
.
find
(
'.block-loading'
).
fadeOut
()
$loading
=
$block
.
find
(
'.block-loading'
).
fadeOut
()
...
@@ -80,18 +81,14 @@ class @MilestoneSelect
...
@@ -80,18 +81,14 @@ class @MilestoneSelect
milestone
.
name
is
selectedMilestone
milestone
.
name
is
selectedMilestone
hidden
:
->
hidden
:
->
$selectbox
.
hide
()
$selectbox
.
hide
()
$value
.
show
()
clicked
:
(
selected
)
->
# display:block overrides the hide-collapse rule
$value
.
removeAttr
(
'style'
)
clicked
:
(
e
)
->
if
$dropdown
.
hasClass
'js-filter-bulk-update'
if
$dropdown
.
hasClass
'js-filter-bulk-update'
return
return
if
$dropdown
.
hasClass
(
'js-filter-submit'
)
if
$dropdown
.
hasClass
'js-filter-submit'
if
selected
.
name
?
selectedMilestone
=
selected
.
name
else
if
selected
.
title
?
selectedMilestone
=
selected
.
title
else
selectedMilestone
=
''
$dropdown
.
parents
(
'form'
).
submit
()
$dropdown
.
parents
(
'form'
).
submit
()
else
else
selected
=
$selectbox
selected
=
$selectbox
...
@@ -109,13 +106,12 @@ class @MilestoneSelect
...
@@ -109,13 +106,12 @@ class @MilestoneSelect
).
done
(
data
)
->
).
done
(
data
)
->
$loading
.
fadeOut
()
$loading
.
fadeOut
()
$selectbox
.
hide
()
$selectbox
.
hide
()
$milestoneLink
=
$value
$value
.
removeAttr
(
'style'
)
.
show
()
.
find
(
'a'
)
if
data
.
milestone
?
if
data
.
milestone
?
data
.
milestone
.
namespace
=
_this
.
currentProject
.
namespace
data
.
milestone
.
namespace
=
_this
.
currentProject
.
namespace
data
.
milestone
.
path
=
_this
.
currentProject
.
path
data
.
milestone
.
path
=
_this
.
currentProject
.
path
$value
.
html
(
milestoneLinkTemplate
(
data
.
milestone
))
$value
.
html
(
milestoneLinkTemplate
(
data
.
milestone
))
$sidebarCollapsedValue
.
text
(
data
.
milestone
.
title
)
else
else
$value
.
html
(
milestoneLinkNoneTemplate
)
$value
.
html
(
milestoneLinkNoneTemplate
)
)
)
\ No newline at end of file
app/assets/javascripts/users_select.js.coffee
View file @
cb619298
...
@@ -19,6 +19,7 @@ class @UsersSelect
...
@@ -19,6 +19,7 @@ class @UsersSelect
$block
=
$selectbox
.
closest
(
'.block'
)
$block
=
$selectbox
.
closest
(
'.block'
)
abilityName
=
$dropdown
.
data
(
'ability-name'
)
abilityName
=
$dropdown
.
data
(
'ability-name'
)
$value
=
$block
.
find
(
'.value'
)
$value
=
$block
.
find
(
'.value'
)
$collapsedSidebar
=
$block
.
find
(
'.sidebar-collapsed-user'
)
$loading
=
$block
.
find
(
'.block-loading'
).
fadeOut
()
$loading
=
$block
.
find
(
'.block-loading'
).
fadeOut
()
$block
.
on
(
'click'
,
'.js-assign-yourself'
,
(
e
)
=>
$block
.
on
(
'click'
,
'.js-assign-yourself'
,
(
e
)
=>
...
@@ -51,11 +52,21 @@ class @UsersSelect
...
@@ -51,11 +52,21 @@ class @UsersSelect
name
:
'Unassigned'
name
:
'Unassigned'
username
:
''
username
:
''
avatar
:
''
avatar
:
''
$value
.
html
(
assigneeTemplate
(
user
))
$collapsedSidebar
.
html
(
collapsedAssigneeTemplate
(
user
))
collapsedAssigneeTemplate
=
_
.
template
(
'<% if( avatar ) { %>
<a class="author_link" href="/u/<%= username %>">
<img width="24" class="avatar avatar-inline s24" alt="" src="<%= avatar %>">
<span class="author">Toni Boehm</span>
</a>
<% } else { %>
<i class="fa fa-user"></i>
<% } %>'
)
$value
.
html
(
noAssigneeTemplate
(
user
))
assigneeTemplate
=
_
.
template
(
$value
.
find
(
'a'
).
attr
(
'href'
)
noAssigneeTemplate
=
_
.
template
(
'<% if (username) { %>
'<% if (username) { %>
<a class="author_link " href="/u/<%= username %>">
<a class="author_link " href="/u/<%= username %>">
<% if( avatar ) { %>
<% if( avatar ) { %>
...
@@ -131,7 +142,8 @@ class @UsersSelect
...
@@ -131,7 +142,8 @@ class @UsersSelect
hidden
:
(
e
)
->
hidden
:
(
e
)
->
$selectbox
.
hide
()
$selectbox
.
hide
()
$value
.
show
()
# display:block overrides the hide-collapse rule
$value
.
removeAttr
(
'style'
)
clicked
:
(
user
)
->
clicked
:
(
user
)
->
page
=
$
(
'body'
).
data
'page'
page
=
$
(
'body'
).
data
'page'
...
...
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