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
Jérome Perrin
gitlab-ce
Commits
bade71ba
Commit
bade71ba
authored
May 25, 2016
by
Felipe Artur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add specs and improve coffescript sortable binding function
parent
c391a72c
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
41 deletions
+37
-41
CHANGELOG
CHANGELOG
+1
-1
app/assets/javascripts/milestone.js.coffee
app/assets/javascripts/milestone.js.coffee
+29
-31
app/controllers/projects/issues_controller.rb
app/controllers/projects/issues_controller.rb
+2
-1
app/models/issue.rb
app/models/issue.rb
+0
-4
app/views/shared/milestones/_issuable.html.haml
app/views/shared/milestones/_issuable.html.haml
+5
-4
No files found.
CHANGELOG
View file @
bade71ba
...
@@ -8,6 +8,7 @@ v 8.10.0 (unreleased)
...
@@ -8,6 +8,7 @@ v 8.10.0 (unreleased)
- Fix pagination when sorting by columns with lots of ties (like priority)
- Fix pagination when sorting by columns with lots of ties (like priority)
- Exclude email check from the standard health check
- Exclude email check from the standard health check
- Implement Subresource Integrity for CSS and JavaScript assets. This prevents malicious assets from loading in the case of a CDN compromise.
- Implement Subresource Integrity for CSS and JavaScript assets. This prevents malicious assets from loading in the case of a CDN compromise.
- Fix changing issue state columns in milestone view
- Fix user creation with stronger minimum password requirements !4054 (nathan-pmt)
- Fix user creation with stronger minimum password requirements !4054 (nathan-pmt)
- Add API endpoint for a group issues !4520 (mahcsig)
- Add API endpoint for a group issues !4520 (mahcsig)
...
@@ -92,7 +93,6 @@ v 8.9.0
...
@@ -92,7 +93,6 @@ v 8.9.0
- Links from a wiki page to other wiki pages should be rewritten as expected
- Links from a wiki page to other wiki pages should be rewritten as expected
- Add option to project to only allow merge requests to be merged if the build succeeds (Rui Santos)
- Add option to project to only allow merge requests to be merged if the build succeeds (Rui Santos)
- Added navigation shortcuts to the project pipelines, milestones, builds and forks page. !4393
- Added navigation shortcuts to the project pipelines, milestones, builds and forks page. !4393
- Fix changing issue state columns in milestone view
- Fix issues filter when ordering by milestone
- Fix issues filter when ordering by milestone
- Disable SAML account unlink feature
- Disable SAML account unlink feature
- Added artifacts:when to .gitlab-ci.yml - this requires GitLab Runner 1.3
- Added artifacts:when to .gitlab-ci.yml - this requires GitLab Runner 1.3
...
...
app/assets/javascripts/milestone.js.coffee
View file @
bade71ba
...
@@ -4,17 +4,9 @@ class @Milestone
...
@@ -4,17 +4,9 @@ class @Milestone
type
:
"PUT"
type
:
"PUT"
url
:
issue_url
url
:
issue_url
data
:
data
data
:
data
success
:
(
data
)
->
success
:
(
_data
)
=>
if
data
.
saved
==
true
@
successCallback
(
_data
,
li
)
if
data
.
assignee_avatar_url
error
:
(
data
)
->
img_tag
=
$
(
'<img/>'
)
img_tag
.
attr
(
'src'
,
data
.
assignee_avatar_url
)
img_tag
.
addClass
(
'avatar s16'
)
$
(
li
).
find
(
'.assignee-icon'
).
html
(
img_tag
)
else
$
(
li
).
find
(
'.assignee-icon'
).
html
(
''
)
$
(
li
).
effect
'highlight'
else
new
Flash
(
"Issue update failed"
,
'alert'
)
new
Flash
(
"Issue update failed"
,
'alert'
)
dataType
:
"json"
dataType
:
"json"
...
@@ -25,8 +17,9 @@ class @Milestone
...
@@ -25,8 +17,9 @@ class @Milestone
type
:
"PUT"
type
:
"PUT"
url
:
sort_issues_url
url
:
sort_issues_url
data
:
data
data
:
data
success
:
(
data
)
->
success
:
(
_data
)
=>
if
data
.
saved
!=
true
@
successCallback
(
_data
)
error
:
->
new
Flash
(
"Issues update failed"
,
'alert'
)
new
Flash
(
"Issues update failed"
,
'alert'
)
dataType
:
"json"
dataType
:
"json"
...
@@ -37,9 +30,10 @@ class @Milestone
...
@@ -37,9 +30,10 @@ class @Milestone
type
:
"PUT"
type
:
"PUT"
url
:
sort_mr_url
url
:
sort_mr_url
data
:
data
data
:
data
success
:
(
data
)
->
success
:
(
_data
)
=>
if
data
.
saved
!=
true
@
successCallback
(
_data
)
new
Flash
(
"MR update failed"
,
'alert'
)
error
:
(
data
)
->
new
Flash
(
"Issue update failed"
,
'alert'
)
dataType
:
"json"
dataType
:
"json"
@
updateMergeRequest
:
(
li
,
merge_request_url
,
data
)
->
@
updateMergeRequest
:
(
li
,
merge_request_url
,
data
)
->
...
@@ -47,19 +41,22 @@ class @Milestone
...
@@ -47,19 +41,22 @@ class @Milestone
type
:
"PUT"
type
:
"PUT"
url
:
merge_request_url
url
:
merge_request_url
data
:
data
data
:
data
success
:
(
data
)
->
success
:
(
_data
)
=>
if
data
.
saved
==
true
@
successCallback
(
_data
,
li
)
if
data
.
assignee_avatar_url
error
:
(
data
)
->
new
Flash
(
"Issue update failed"
,
'alert'
)
dataType
:
"json"
@
successCallback
:
(
data
,
element
)
=>
if
data
.
assignee
img_tag
=
$
(
'<img/>'
)
img_tag
=
$
(
'<img/>'
)
img_tag
.
attr
(
'src'
,
data
.
assignee_
avatar_url
)
img_tag
.
attr
(
'src'
,
data
.
assignee
.
avatar_url
)
img_tag
.
addClass
(
'avatar s16'
)
img_tag
.
addClass
(
'avatar s16'
)
$
(
li
).
find
(
'.assignee-icon'
).
html
(
img_tag
)
$
(
element
).
find
(
'.assignee-icon'
).
html
(
img_tag
)
else
$
(
li
).
find
(
'.assignee-icon'
).
html
(
''
)
$
(
li
).
effect
'highlight'
else
else
new
Flash
(
"Issue update failed"
,
'alert'
)
$
(
element
).
find
(
'.assignee-icon'
).
html
(
''
)
dataType
:
"json"
$
(
element
).
effect
'highlight'
constructor
:
->
constructor
:
->
oldMouseStart
=
$
.
ui
.
sortable
.
prototype
.
_mouseStart
oldMouseStart
=
$
.
ui
.
sortable
.
prototype
.
_mouseStart
...
@@ -81,7 +78,8 @@ class @Milestone
...
@@ -81,7 +78,8 @@ class @Milestone
stop
:
(
event
,
ui
)
->
stop
:
(
event
,
ui
)
->
$
(
".issues-sortable-list"
).
css
"min-height"
,
"0px"
$
(
".issues-sortable-list"
).
css
"min-height"
,
"0px"
update
:
(
event
,
ui
)
->
update
:
(
event
,
ui
)
->
if
this
==
ui
.
item
.
parent
()[
0
]
# Prevents sorting from container which element has been removed.
if
$
(
this
).
find
(
ui
.
item
).
length
>
0
data
=
$
(
this
).
sortable
(
"serialize"
)
data
=
$
(
this
).
sortable
(
"serialize"
)
Milestone
.
sortIssues
(
data
)
Milestone
.
sortIssues
(
data
)
...
...
app/controllers/projects/issues_controller.rb
View file @
bade71ba
...
@@ -115,8 +115,9 @@ class Projects::IssuesController < Projects::ApplicationController
...
@@ -115,8 +115,9 @@ class Projects::IssuesController < Projects::ApplicationController
render
:edit
render
:edit
end
end
end
end
format
.
json
do
format
.
json
do
render
json:
@issue
.
to_json
(
include:
{
milestone:
{},
assignee:
{
methods: :avatar_url
},
labels:
{
methods: :text_color
}
}
,
methods: :saved
)
render
json:
@issue
.
to_json
(
include:
{
milestone:
{},
assignee:
{
methods: :avatar_url
},
labels:
{
methods: :text_color
}
})
end
end
end
end
end
end
...
...
app/models/issue.rb
View file @
bade71ba
...
@@ -190,8 +190,4 @@ class Issue < ActiveRecord::Base
...
@@ -190,8 +190,4 @@ class Issue < ActiveRecord::Base
def
overdue?
def
overdue?
due_date
.
try
(
:past?
)
||
false
due_date
.
try
(
:past?
)
||
false
end
end
def
saved
valid?
end
end
end
app/views/shared/milestones/_issuable.html.haml
View file @
bade71ba
...
@@ -21,6 +21,7 @@
...
@@ -21,6 +21,7 @@
=
link_to
polymorphic_path
(
base_url_args
,
{
milestone_title:
@milestone
.
title
,
label_name:
label
.
title
,
state:
'all'
})
do
=
link_to
polymorphic_path
(
base_url_args
,
{
milestone_title:
@milestone
.
title
,
label_name:
label
.
title
,
state:
'all'
})
do
-
render_colored_label
(
label
)
-
render_colored_label
(
label
)
%span
{
class:
"assignee-icon"
}
-
if
assignee
-
if
assignee
=
link_to
polymorphic_path
(
base_url_args
,
{
milestone_title:
@milestone
.
title
,
assignee_id:
issuable
.
assignee_id
,
state:
'all'
}),
=
link_to
polymorphic_path
(
base_url_args
,
{
milestone_title:
@milestone
.
title
,
assignee_id:
issuable
.
assignee_id
,
state:
'all'
}),
class:
'has-tooltip'
,
title:
"Assigned to
#{
assignee
.
name
}
"
,
data:
{
container:
'body'
}
do
class:
'has-tooltip'
,
title:
"Assigned to
#{
assignee
.
name
}
"
,
data:
{
container:
'body'
}
do
...
...
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