Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
9acfa635
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,发现更多精彩内容 >>
提交
9acfa635
编写于
3月 24, 2017
作者:
D
dimitrieh
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
adds todo functionality to closed issuable sidebar and changes todo bell icon to check-square
上级
8cc4a39b
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
30 addition
and
8 deletion
+30
-8
app/assets/javascripts/right_sidebar.js
app/assets/javascripts/right_sidebar.js
+2
-2
app/assets/stylesheets/pages/issuable.scss
app/assets/stylesheets/pages/issuable.scss
+8
-0
app/assets/stylesheets/pages/todos.scss
app/assets/stylesheets/pages/todos.scss
+5
-5
app/views/layouts/header/_default.html.haml
app/views/layouts/header/_default.html.haml
+1
-1
app/views/shared/issuable/_sidebar.html.haml
app/views/shared/issuable/_sidebar.html.haml
+9
-0
changelogs/unreleased/create-collapsed-todo-button.yml
changelogs/unreleased/create-collapsed-todo-button.yml
+5
-0
未找到文件。
app/assets/javascripts/right_sidebar.js
浏览文件 @
9acfa635
...
...
@@ -97,10 +97,10 @@ import Cookies from 'js-cookie';
if
(
data
.
delete_path
!=
null
)
{
$btn
.
attr
(
'
aria-label
'
,
$btn
.
data
(
'
mark-text
'
)).
attr
(
'
data-delete-path
'
,
data
.
delete_path
);
return
$btnText
.
text
(
$btn
.
data
(
'
mark-text
'
));
return
$btnText
.
html
(
$btn
.
data
(
'
mark-text
'
));
}
else
{
$btn
.
attr
(
'
aria-label
'
,
$btn
.
data
(
'
todo-text
'
)).
removeAttr
(
'
data-delete-path
'
);
return
$btnText
.
text
(
$btn
.
data
(
'
todo-text
'
));
return
$btnText
.
html
(
$btn
.
data
(
'
todo-text
'
));
}
};
...
...
app/assets/stylesheets/pages/issuable.scss
浏览文件 @
9acfa635
...
...
@@ -294,6 +294,14 @@
margin-top
:
0
;
}
.todo-undone
{
color
:
$gl-link-color
;
&
:hover
{
color
:
$gl-text-color
;
}
}
.author
{
display
:
none
;
}
...
...
app/assets/stylesheets/pages/todos.scss
浏览文件 @
9acfa635
...
...
@@ -7,17 +7,17 @@
li
{
.badge.todos-pending-count
{
position
:
inherit
;
top
:
-
6
px
;
top
:
-
10
px
;
margin-top
:
-5px
;
font-weight
:
normal
;
background
:
$todo-alert-blue
;
margin-left
:
-1
7
px
;
margin-left
:
-1
3
px
;
font-size
:
11px
;
color
:
$white-light
;
padding
:
3
px
;
padding
:
4
px
;
padding-top
:
1px
;
padding-bottom
:
1
px
;
border-radius
:
3
px
;
padding-bottom
:
2
px
;
border-radius
:
6
px
;
}
}
}
...
...
app/views/layouts/header/_default.html.haml
浏览文件 @
9acfa635
...
...
@@ -33,7 +33,7 @@
=
icon
(
'wrench fw'
)
%li
=
link_to
dashboard_todos_path
,
title:
'Todos'
,
aria:
{
label:
"Todos"
},
class:
'shortcuts-todos'
,
data:
{
toggle:
'tooltip'
,
placement:
'bottom'
,
container:
'body'
}
do
=
icon
(
'
bell
fw'
)
=
icon
(
'
check-square
fw'
)
%span
.badge.todos-pending-count
{
class:
(
"hidden"
if
todos_pending_count
==
0
)
}
=
todos_count_format
(
todos_pending_count
)
-
if
current_user
.
can_create_project?
...
...
app/views/shared/issuable/_sidebar.html.haml
浏览文件 @
9acfa635
...
...
@@ -22,6 +22,15 @@
=
icon
(
'spin spinner'
,
class:
'hidden js-issuable-todo-loading'
,
'aria-hidden'
:
'true'
)
=
form_for
[
@project
.
namespace
.
becomes
(
Namespace
),
@project
,
issuable
],
remote:
true
,
format: :json
,
html:
{
class:
'issuable-context-form inline-update js-issuable-update'
}
do
|
f
|
-
if
current_user
.block.todo
.sidebar-collapsed-icon.dont-change-state.js-issuable-todo
{
type:
"div"
,
aria:
{
label:
(
todo
.
nil?
?
icon
(
'plus-square'
)
:
icon
(
'check-square'
,
class:
'todo-undone'
))
},
data:
{
todo_text:
icon
(
'plus-square'
),
mark_text:
icon
(
'check-square'
,
class:
'todo-undone'
),
issuable_id:
issuable
.
id
,
issuable_type:
issuable
.
class
.
name
.
underscore
,
url:
namespace_project_todos_path
(
@project
.
namespace
,
@project
),
delete_path:
(
dashboard_todo_path
(
todo
)
if
todo
)
}
}
%span
.js-issuable-todo-text
-
if
todo
=
icon
(
'check-square'
,
class:
'todo-undone'
)
-
else
=
icon
(
'plus-square'
)
=
icon
(
'spin spinner'
,
class:
'hidden js-issuable-todo-loading'
)
.block.assignee
.sidebar-collapsed-icon.sidebar-collapsed-user
{
data:
{
toggle:
"tooltip"
,
placement:
"left"
,
container:
"body"
},
title:
(
issuable
.
assignee
.
name
if
issuable
.
assignee
)
}
-
if
issuable
.
assignee
...
...
changelogs/unreleased/create-collapsed-todo-button.yml
0 → 100644
浏览文件 @
9acfa635
---
title
:
adds todo functionality to closed issuable sidebar and changes todo bell icon
to check-square
merge_request
:
author
:
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录