Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
78840333
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,发现更多精彩内容 >>
提交
78840333
编写于
3月 22, 2017
作者:
S
Sean McGivern
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'add-todos-shortcut' into 'master'
Add global `g t` shortcut to go to todos See merge request !10041
上级
141ee129
c77fc4ce
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
23 addition
and
1 deletion
+23
-1
app/assets/javascripts/shortcuts_dashboard_navigation.js
app/assets/javascripts/shortcuts_dashboard_navigation.js
+3
-0
app/assets/javascripts/shortcuts_navigation.js
app/assets/javascripts/shortcuts_navigation.js
+3
-0
app/views/help/_shortcuts.html.haml
app/views/help/_shortcuts.html.haml
+6
-0
app/views/layouts/header/_default.html.haml
app/views/layouts/header/_default.html.haml
+1
-1
changelogs/unreleased/add-todos-shortcut.yml
changelogs/unreleased/add-todos-shortcut.yml
+4
-0
doc/workflow/shortcuts.md
doc/workflow/shortcuts.md
+1
-0
spec/features/dashboard/shortcuts_spec.rb
spec/features/dashboard/shortcuts_spec.rb
+5
-0
未找到文件。
app/assets/javascripts/shortcuts_dashboard_navigation.js
浏览文件 @
78840333
...
...
@@ -22,6 +22,9 @@ require('./shortcuts');
Mousetrap
.
bind
(
'
g m
'
,
function
()
{
return
ShortcutsDashboardNavigation
.
findAndFollowLink
(
'
.dashboard-shortcuts-merge_requests
'
);
});
Mousetrap
.
bind
(
'
g t
'
,
function
()
{
return
ShortcutsDashboardNavigation
.
findAndFollowLink
(
'
.shortcuts-todos
'
);
});
Mousetrap
.
bind
(
'
g p
'
,
function
()
{
return
ShortcutsDashboardNavigation
.
findAndFollowLink
(
'
.dashboard-shortcuts-projects
'
);
});
...
...
app/assets/javascripts/shortcuts_navigation.js
浏览文件 @
78840333
...
...
@@ -43,6 +43,9 @@ require('./shortcuts');
Mousetrap
.
bind
(
'
g m
'
,
function
()
{
return
ShortcutsNavigation
.
findAndFollowLink
(
'
.shortcuts-merge_requests
'
);
});
Mousetrap
.
bind
(
'
g t
'
,
function
()
{
return
ShortcutsNavigation
.
findAndFollowLink
(
'
.shortcuts-todos
'
);
});
Mousetrap
.
bind
(
'
g w
'
,
function
()
{
return
ShortcutsNavigation
.
findAndFollowLink
(
'
.shortcuts-wiki
'
);
});
...
...
app/views/help/_shortcuts.html.haml
浏览文件 @
78840333
...
...
@@ -118,6 +118,12 @@
.key
m
%td
Go to merge requests
%tr
%td
.shortcut
.key
g
.key
t
%td
Go to todos
%tbody
%tr
%th
...
...
app/views/layouts/header/_default.html.haml
浏览文件 @
78840333
...
...
@@ -32,7 +32,7 @@
=
link_to
admin_root_path
,
title:
'Admin Area'
,
aria:
{
label:
"Admin Area"
},
data:
{
toggle:
'tooltip'
,
placement:
'bottom'
,
container:
'body'
}
do
=
icon
(
'wrench fw'
)
%li
=
link_to
dashboard_todos_path
,
title:
'Todos'
,
aria:
{
label:
"Todos"
},
data:
{
toggle:
'tooltip'
,
placement:
'bottom'
,
container:
'body'
}
do
=
link_to
dashboard_todos_path
,
title:
'Todos'
,
aria:
{
label:
"Todos"
},
class:
'shortcuts-todos'
,
data:
{
toggle:
'tooltip'
,
placement:
'bottom'
,
container:
'body'
}
do
=
icon
(
'bell fw'
)
%span
.badge.todos-pending-count
{
class:
(
"hidden"
if
todos_pending_count
==
0
)
}
=
todos_count_format
(
todos_pending_count
)
...
...
changelogs/unreleased/add-todos-shortcut.yml
0 → 100644
浏览文件 @
78840333
---
title
:
Add `g t` global shortcut to go to todos
merge_request
:
author
:
doc/workflow/shortcuts.md
浏览文件 @
78840333
...
...
@@ -36,6 +36,7 @@ You can see GitLab's keyboard shortcuts by using 'shift + ?'
|
<kbd>
g
</kbd>
+
<kbd>
p
</kbd>
| Go to projects |
|
<kbd>
g
</kbd>
+
<kbd>
i
</kbd>
| Go to issues |
|
<kbd>
g
</kbd>
+
<kbd>
m
</kbd>
| Go to merge requests |
|
<kbd>
g
</kbd>
+
<kbd>
t
</kbd>
| Go to todos |
## Project
...
...
spec/features/dashboard/shortcuts_spec.rb
浏览文件 @
78840333
...
...
@@ -21,6 +21,11 @@ feature 'Dashboard shortcuts', feature: true, js: true do
find
(
'body'
).
native
.
send_key
(
'm'
)
check_page_title
(
'Merge Requests'
)
find
(
'body'
).
native
.
send_key
(
'g'
)
find
(
'body'
).
native
.
send_key
(
't'
)
check_page_title
(
'Todos'
)
end
def
check_page_title
(
title
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录