Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
610ea22e
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,发现更多精彩内容 >>
提交
610ea22e
编写于
3月 29, 2017
作者:
A
Annabel Dunstone Gray
提交者:
Jacob Schatz
4月 06, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Map bindings to lowercase letters; only show key bindings when using keyboard shortcut
上级
82ababf0
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
45 addition
and
39 deletion
+45
-39
app/assets/javascripts/shortcuts.js
app/assets/javascripts/shortcuts.js
+31
-25
app/views/layouts/nav/_dashboard.html.haml
app/views/layouts/nav/_dashboard.html.haml
+14
-14
未找到文件。
app/assets/javascripts/shortcuts.js
浏览文件 @
610ea22e
...
...
@@ -19,43 +19,49 @@
return
_this
.
focusFilter
(
e
);
};
})(
this
));
function
gotoMenu
(
menu
){
if
(
$
(
'
.global-dropdown.open
'
).
length
)
{
window
.
location
.
href
=
$
(
'
.global-dropdown-menu .dashboard-shortcuts-
'
+
menu
).
attr
(
'
href
'
);
}
window
.
location
.
href
=
$
(
'
.js-dashboard-shortcuts-
'
+
menu
).
attr
(
'
href
'
);
}
Mousetrap
.
bind
(
'
n
'
,
function
()
{
$
(
'
.global-dropdown-menu
'
).
addClass
(
'
shortcuts
'
)
$
(
'
.global-dropdown-toggle
'
).
trigger
(
'
click
'
);
$
(
'
.global-dropdown
'
).
on
(
'
hide.bs.dropdow
n
'
,
function
()
{
$
(
'
.global-dropdown-menu
'
).
removeClass
(
'
shortcuts
'
);
Mousetrap
.
unbind
([
'
p
'
,
'
a
'
,
'
r
'
,
'
l
'
,
'
i
'
,
'
m
'
,
'
e
'
]
);
});
Mousetrap
.
bind
(
'
P
'
,
function
()
{
gotoMenu
(
'
projects
'
);
});
$
(
'
.global-dropdown
'
).
on
(
'
show.bs.dropdown
'
,
function
()
{
Mousetrap
.
bind
(
'
p
'
,
function
()
{
gotoMenu
(
'
projects
'
);
});
Mousetrap
.
bind
(
'
A
'
,
function
()
{
gotoMenu
(
'
activity
'
);
});
Mousetrap
.
bind
(
'
a
'
,
function
()
{
gotoMenu
(
'
activity
'
);
});
Mousetrap
.
bind
(
'
G
'
,
function
()
{
gotoMenu
(
'
groups
'
);
});
Mousetrap
.
bind
(
'
r
'
,
function
()
{
gotoMenu
(
'
groups
'
);
});
Mousetrap
.
bind
(
'
L
'
,
function
()
{
gotoMenu
(
'
milestones
'
);
});
Mousetrap
.
bind
(
'
l
'
,
function
()
{
gotoMenu
(
'
milestones
'
);
});
Mousetrap
.
bind
(
'
I
'
,
function
()
{
gotoMenu
(
'
issues
'
);
});
Mousetrap
.
bind
(
'
i
'
,
function
()
{
gotoMenu
(
'
issues
'
);
});
Mousetrap
.
bind
(
'
M
'
,
function
()
{
gotoMenu
(
'
merge_requests
'
);
Mousetrap
.
bind
(
'
m
'
,
function
()
{
gotoMenu
(
'
merge_requests
'
);
});
Mousetrap
.
bind
(
'
e
'
,
function
()
{
gotoMenu
(
'
snippets
'
);
});
});
Mousetrap
.
bind
(
'
S
'
,
function
()
{
gotoMenu
(
'
snippets
'
);
Mousetrap
.
bind
(
'
n
'
,
function
()
{
$
(
'
.global-dropdown-menu
'
).
addClass
(
'
shortcuts
'
);
$
(
'
.global-dropdown-toggle
'
).
trigger
(
'
click
'
);
});
Mousetrap
.
bind
([
'
ctrl+shift+p
'
,
'
command+shift+p
'
],
this
.
toggleMarkdownPreview
);
...
...
app/views/layouts/nav/_dashboard.html.haml
浏览文件 @
610ea22e
%ul
=
nav_link
(
path:
[
'root#index'
,
'projects#trending'
,
'projects#starred'
,
'dashboard/projects#index'
],
html_options:
{
class:
"
#{
project_tab_class
}
home"
})
do
=
link_to
dashboard_projects_path
,
title:
'Projects'
,
class:
'dashboard-shortcuts-projects'
do
=
link_to
dashboard_projects_path
,
title:
'Projects'
,
class:
'
js-
dashboard-shortcuts-projects'
do
.kbd
P
p
%span
Projects
=
nav_link
(
path:
'dashboard#activity'
)
do
=
link_to
activity_dashboard_path
,
class:
'dashboard-shortcuts-activity'
,
title:
'Activity'
do
=
link_to
activity_dashboard_path
,
class:
'
js-
dashboard-shortcuts-activity'
,
title:
'Activity'
do
.kbd
A
a
%span
Activity
-
if
koding_enabled?
...
...
@@ -17,35 +17,35 @@
%span
Koding
=
nav_link
(
controller:
[
:groups
,
'groups/milestones'
,
'groups/group_members'
])
do
=
link_to
dashboard_groups_path
,
class:
'dashboard-shortcuts-groups'
,
title:
'Groups'
do
=
link_to
dashboard_groups_path
,
class:
'
js-
dashboard-shortcuts-groups'
,
title:
'Groups'
do
.kbd
G
r
%span
Groups
=
nav_link
(
controller:
'dashboard/milestones'
)
do
=
link_to
dashboard_milestones_path
,
class:
'dashboard-shortcuts-milestones'
,
title:
'Milestones'
do
=
link_to
dashboard_milestones_path
,
class:
'
js-
dashboard-shortcuts-milestones'
,
title:
'Milestones'
do
.kbd
L
l
%span
Milestones
=
nav_link
(
path:
'dashboard#issues'
)
do
=
link_to
assigned_issues_dashboard_path
,
title:
'Issues'
,
class:
'dashboard-shortcuts-issues'
do
=
link_to
assigned_issues_dashboard_path
,
title:
'Issues'
,
class:
'
js-
dashboard-shortcuts-issues'
do
.kbd
I
i
%span
Issues
.badge
=
number_with_delimiter
(
cached_assigned_issuables_count
(
current_user
,
:issues
,
:opened
))
=
nav_link
(
path:
'dashboard#merge_requests'
)
do
=
link_to
assigned_mrs_dashboard_path
,
title:
'Merge Requests'
,
class:
'dashboard-shortcuts-merge_requests'
do
=
link_to
assigned_mrs_dashboard_path
,
title:
'Merge Requests'
,
class:
'
js-
dashboard-shortcuts-merge_requests'
do
.kbd
M
m
%span
Merge Requests
.badge
=
number_with_delimiter
(
cached_assigned_issuables_count
(
current_user
,
:merge_requests
,
:opened
))
=
nav_link
(
controller:
'dashboard/snippets'
)
do
=
link_to
dashboard_snippets_path
,
class:
'dashboard-shortcuts-snippets'
,
title:
'Snippets'
do
=
link_to
dashboard_snippets_path
,
class:
'
js-
dashboard-shortcuts-snippets'
,
title:
'Snippets'
do
.kbd
S
e
%span
Snippets
%li
.divider
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录