Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
bade71ba
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
bade71ba
编写于
5月 25, 2016
作者:
F
Felipe Artur
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add specs and improve coffescript sortable binding function
上级
c391a72c
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
37 addition
and
41 deletion
+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
未找到文件。
CHANGELOG
浏览文件 @
bade71ba
...
...
@@ -8,6 +8,7 @@ v 8.10.0 (unreleased)
- Fix pagination when sorting by columns with lots of ties (like priority)
- 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.
- Fix changing issue state columns in milestone view
- Fix user creation with stronger minimum password requirements !4054 (nathan-pmt)
- Add API endpoint for a group issues !4520 (mahcsig)
...
...
@@ -92,7 +93,6 @@ v 8.9.0
- 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)
- 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
- Disable SAML account unlink feature
- Added artifacts:when to .gitlab-ci.yml - this requires GitLab Runner 1.3
...
...
app/assets/javascripts/milestone.js.coffee
浏览文件 @
bade71ba
...
...
@@ -4,18 +4,10 @@ class @Milestone
type
:
"PUT"
url
:
issue_url
data
:
data
success
:
(
data
)
->
if
data
.
saved
==
true
if
data
.
assignee_avatar_url
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'
)
success
:
(
_data
)
=>
@
successCallback
(
_data
,
li
)
error
:
(
data
)
->
new
Flash
(
"Issue update failed"
,
'alert'
)
dataType
:
"json"
@
sortIssues
:
(
data
)
->
...
...
@@ -25,9 +17,10 @@ class @Milestone
type
:
"PUT"
url
:
sort_issues_url
data
:
data
success
:
(
data
)
->
if
data
.
saved
!=
true
new
Flash
(
"Issues update failed"
,
'alert'
)
success
:
(
_data
)
=>
@
successCallback
(
_data
)
error
:
->
new
Flash
(
"Issues update failed"
,
'alert'
)
dataType
:
"json"
@
sortMergeRequests
:
(
data
)
->
...
...
@@ -37,9 +30,10 @@ class @Milestone
type
:
"PUT"
url
:
sort_mr_url
data
:
data
success
:
(
data
)
->
if
data
.
saved
!=
true
new
Flash
(
"MR update failed"
,
'alert'
)
success
:
(
_data
)
=>
@
successCallback
(
_data
)
error
:
(
data
)
->
new
Flash
(
"Issue update failed"
,
'alert'
)
dataType
:
"json"
@
updateMergeRequest
:
(
li
,
merge_request_url
,
data
)
->
...
...
@@ -47,20 +41,23 @@ class @Milestone
type
:
"PUT"
url
:
merge_request_url
data
:
data
success
:
(
data
)
->
if
data
.
saved
==
true
if
data
.
assignee_avatar_url
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'
)
success
:
(
_data
)
=>
@
successCallback
(
_data
,
li
)
error
:
(
data
)
->
new
Flash
(
"Issue update failed"
,
'alert'
)
dataType
:
"json"
@
successCallback
:
(
data
,
element
)
=>
if
data
.
assignee
img_tag
=
$
(
'<img/>'
)
img_tag
.
attr
(
'src'
,
data
.
assignee
.
avatar_url
)
img_tag
.
addClass
(
'avatar s16'
)
$
(
element
).
find
(
'.assignee-icon'
).
html
(
img_tag
)
else
$
(
element
).
find
(
'.assignee-icon'
).
html
(
''
)
$
(
element
).
effect
'highlight'
constructor
:
->
oldMouseStart
=
$
.
ui
.
sortable
.
prototype
.
_mouseStart
$
.
ui
.
sortable
.
prototype
.
_mouseStart
=
(
event
,
overrideHandle
,
noActivation
)
->
...
...
@@ -81,7 +78,8 @@ class @Milestone
stop
:
(
event
,
ui
)
->
$
(
".issues-sortable-list"
).
css
"min-height"
,
"0px"
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"
)
Milestone
.
sortIssues
(
data
)
...
...
app/controllers/projects/issues_controller.rb
浏览文件 @
bade71ba
...
...
@@ -115,8 +115,9 @@ class Projects::IssuesController < Projects::ApplicationController
render
:edit
end
end
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
...
...
app/models/issue.rb
浏览文件 @
bade71ba
...
...
@@ -190,8 +190,4 @@ class Issue < ActiveRecord::Base
def
overdue?
due_date
.
try
(
:past?
)
||
false
end
def
saved
valid?
end
end
app/views/shared/milestones/_issuable.html.haml
浏览文件 @
bade71ba
...
...
@@ -21,7 +21,8 @@
=
link_to
polymorphic_path
(
base_url_args
,
{
milestone_title:
@milestone
.
title
,
label_name:
label
.
title
,
state:
'all'
})
do
-
render_colored_label
(
label
)
-
if
assignee
=
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
-
image_tag
(
avatar_icon
(
issuable
.
assignee
,
16
),
class:
"avatar s16"
,
alt:
''
)
%span
{
class:
"assignee-icon"
}
-
if
assignee
=
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
-
image_tag
(
avatar_icon
(
issuable
.
assignee
,
16
),
class:
"avatar s16"
,
alt:
''
)
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录