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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
6f48cb86
Commit
6f48cb86
authored
Mar 19, 2016
by
Jacob Schatz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix broken functionality in sidebar after merge.
Added nice animations too.
parent
531331f7
Changes
9
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
53 additions
and
17 deletions
+53
-17
app/assets/javascripts/gl_dropdown.js.coffee
app/assets/javascripts/gl_dropdown.js.coffee
+1
-1
app/assets/javascripts/labels_select.js.coffee
app/assets/javascripts/labels_select.js.coffee
+14
-4
app/assets/javascripts/lib/animate.js.coffee
app/assets/javascripts/lib/animate.js.coffee
+13
-0
app/assets/javascripts/milestone_select.js.coffee
app/assets/javascripts/milestone_select.js.coffee
+7
-9
app/assets/javascripts/users_select.js.coffee
app/assets/javascripts/users_select.js.coffee
+3
-0
app/assets/stylesheets/application.scss
app/assets/stylesheets/application.scss
+1
-0
app/assets/stylesheets/pages/issuable.scss
app/assets/stylesheets/pages/issuable.scss
+1
-1
app/views/shared/issuable/_sidebar.html.haml
app/views/shared/issuable/_sidebar.html.haml
+2
-2
vendor/assets/stylesheets/animate.css
vendor/assets/stylesheets/animate.css
+11
-0
No files found.
app/assets/javascripts/gl_dropdown.js.coffee
View file @
6f48cb86
...
@@ -286,8 +286,8 @@ class GitLabDropdown
...
@@ -286,8 +286,8 @@ class GitLabDropdown
selectedObject
=
@
renderedData
[
selectedIndex
]
selectedObject
=
@
renderedData
[
selectedIndex
]
value
=
if
@
options
.
id
then
@
options
.
id
(
selectedObject
,
el
)
else
selectedObject
.
id
value
=
if
@
options
.
id
then
@
options
.
id
(
selectedObject
,
el
)
else
selectedObject
.
id
field
=
@
dropdown
.
parent
().
find
(
"input[name='
#{
fieldName
}
'][value='
#{
value
}
']"
)
field
=
@
dropdown
.
parent
().
find
(
"input[name='
#{
fieldName
}
'][value='
#{
value
}
']"
)
if
el
.
hasClass
(
ACTIVE_CLASS
)
if
el
.
hasClass
(
ACTIVE_CLASS
)
el
.
removeClass
(
ACTIVE_CLASS
)
field
.
remove
()
field
.
remove
()
else
else
fieldName
=
@
options
.
fieldName
fieldName
=
@
options
.
fieldName
...
...
app/assets/javascripts/labels_select.js.coffee
View file @
6f48cb86
...
@@ -28,8 +28,8 @@ class @LabelsSelect
...
@@ -28,8 +28,8 @@ class @LabelsSelect
# Suggested colors in the dropdown to chose from pre-chosen colors
# Suggested colors in the dropdown to chose from pre-chosen colors
$
(
'.suggest-colors-dropdown a'
).
on
'click'
,
(
e
)
->
$
(
'.suggest-colors-dropdown a'
).
on
'click'
,
(
e
)
->
issueURLSplit
=
issueU
RL
.
split
(
'/'
)
if
issu
eURL
?
issueURLSplit
=
issueU
pdateURL
.
split
(
'/'
)
if
issueUpdat
eURL
?
if
issueURL
if
issueU
pdateU
RL
labelHTMLTemplate
=
_
.
template
(
labelHTMLTemplate
=
_
.
template
(
'<% _.each(labels, function(label){ %>'
+
'<% _.each(labels, function(label){ %>'
+
'<a href="'
+
'<a href="'
+
...
@@ -147,7 +147,7 @@ class @LabelsSelect
...
@@ -147,7 +147,7 @@ class @LabelsSelect
$loading
.
fadeIn
()
$loading
.
fadeIn
()
$
.
ajax
(
$
.
ajax
(
type
:
'PUT'
type
:
'PUT'
url
:
issueURL
url
:
issueU
pdateU
RL
dataType
:
'JSON'
dataType
:
'JSON'
data
:
data
data
:
data
).
done
(
data
)
->
).
done
(
data
)
->
...
@@ -160,7 +160,15 @@ class @LabelsSelect
...
@@ -160,7 +160,15 @@ class @LabelsSelect
href
=
$value
href
=
$value
.
show
()
.
show
()
.
html
(
template
)
.
html
(
template
)
>>>>>>>
Add
multi
select
stay
open
functionality
$value
.
find
(
'a'
)
.
each
((
i
)
->
setTimeout
(
=>
glAnimate
(
$
(
@
),
'pulse'
)
,
200
*
i
)
)
$dropdown
.
glDropdown
(
$dropdown
.
glDropdown
(
data
:
(
term
,
callback
)
->
data
:
(
term
,
callback
)
->
...
@@ -224,6 +232,8 @@ class @LabelsSelect
...
@@ -224,6 +232,8 @@ class @LabelsSelect
hidden
:
->
hidden
:
->
$selectbox
.
hide
()
$selectbox
.
hide
()
$value
.
show
()
$value
.
show
()
if
$dropdown
.
hasClass
'js-multiselect'
saveLabelData
()
multiSelect
:
$dropdown
.
hasClass
'js-multiselect'
multiSelect
:
$dropdown
.
hasClass
'js-multiselect'
...
...
app/assets/javascripts/lib/animate.js.coffee
0 → 100644
View file @
6f48cb86
((
w
)
->
w
.
glAnimate
=
(
$el
,
animation
,
done
)
->
$el
.
removeClass
()
.
addClass
(
animation
+
' animated'
)
.
one
'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend'
,
->
$
(
this
).
removeClass
()
return
return
return
)
window
\ No newline at end of file
app/assets/javascripts/milestone_select.js.coffee
View file @
6f48cb86
...
@@ -67,8 +67,7 @@ class @MilestoneSelect
...
@@ -67,8 +67,7 @@ class @MilestoneSelect
if
$dropdown
.
hasClass
"js-filter-submit"
if
$dropdown
.
hasClass
"js-filter-submit"
$dropdown
.
parents
(
'form'
).
submit
()
$dropdown
.
parents
(
'form'
).
submit
()
else
else
selected
=
$dropdown
selected
=
$selectbox
.
closest
(
'.selectbox'
)
.
find
(
'input[type="hidden"]'
)
.
find
(
'input[type="hidden"]'
)
.
val
()
.
val
()
data
=
{}
data
=
{}
...
@@ -83,16 +82,15 @@ class @MilestoneSelect
...
@@ -83,16 +82,15 @@ class @MilestoneSelect
).
done
(
data
)
->
).
done
(
data
)
->
$loading
.
fadeOut
()
$loading
.
fadeOut
()
$selectbox
.
hide
()
$selectbox
.
hide
()
href
=
$value
$milestoneLink
=
$value
.
show
()
.
show
()
.
find
(
'.milestone-title'
)
.
text
(
data
.
milestone
.
title
)
.
end
()
.
find
(
'a'
)
.
find
(
'a'
)
href
=
$milestoneLink
.
text
(
data
.
milestone
.
title
)
.
attr
(
'href'
)
.
attr
(
'href'
)
splitHref
=
href
.
split
(
'/'
)
splitHref
=
href
.
split
(
'/'
)
splitHref
[
splitHref
.
length
-
1
]
=
data
.
id
splitHref
[
splitHref
.
length
-
1
]
=
data
.
milestone
.
iid
$value
$milestoneLink
.
find
(
'a'
)
.
attr
(
'href'
,
splitHref
.
join
(
'/'
))
.
attr
(
'href'
,
splitHref
.
join
(
'/'
))
)
)
\ No newline at end of file
app/assets/javascripts/users_select.js.coffee
View file @
6f48cb86
...
@@ -105,6 +105,9 @@ class @UsersSelect
...
@@ -105,6 +105,9 @@ class @UsersSelect
.
find
(
'.author'
)
.
find
(
'.author'
)
.
text
(
data
.
assignee
.
name
)
.
text
(
data
.
assignee
.
name
)
.
end
()
.
end
()
.
find
(
'.username'
)
.
text
(
"@
#{
data
.
assignee
.
username
}
"
)
.
end
()
.
find
(
'a'
)
.
find
(
'a'
)
.
attr
(
'href'
)
.
attr
(
'href'
)
splitHref
=
href
.
split
(
'/'
)
splitHref
=
href
.
split
(
'/'
)
...
...
app/assets/stylesheets/application.scss
View file @
6f48cb86
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
*= require dropzone/basic
*= require dropzone/basic
*= require cal-heatmap
*= require cal-heatmap
*= require cropper.css
*= require cropper.css
*= require animate
*/
*/
/*
/*
...
...
app/assets/stylesheets/pages/issuable.scss
View file @
6f48cb86
...
@@ -255,7 +255,7 @@
...
@@ -255,7 +255,7 @@
.dropdown-menu-toggle
{
.dropdown-menu-toggle
{
width
:
100%
;
width
:
100%
;
padding-top
:
0
;
padding-top
:
6px
;
}
}
.open
.dropdown-menu
{
.open
.dropdown-menu
{
...
...
app/views/shared/issuable/_sidebar.html.haml
View file @
6f48cb86
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
.issuable-sidebar
.issuable-sidebar
.block.issuable-sidebar-header
.block.issuable-sidebar-header
-
if
issuable
.
to_ability_name
==
'merge_request'
-
if
issuable
.
to_ability_name
==
'merge_request'
-
issuable_url
=
namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
issuable
.
iid
)
-
issuable_url
=
namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
issuable
.
iid
,
:json
)
-
else
-
else
-
issuable_url
=
namespace_project_issue_path
(
@project
.
namespace
,
@project
,
issuable
.
iid
)
-
issuable_url
=
namespace_project_issue_path
(
@project
.
namespace
,
@project
,
issuable
.
iid
,
:json
)
%span
.issuable-count.hide-collapsed.pull-left
%span
.issuable-count.hide-collapsed.pull-left
=
issuable
.
iid
=
issuable
.
iid
of
of
...
...
vendor/assets/stylesheets/animate.css
0 → 100644
View file @
6f48cb86
This diff is collapsed.
Click to expand it.
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