summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-09-08 22:09:12 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-09-08 22:09:12 +0300
commit3d1a246f2c9c146d444aad68567eb06b84d82783 (patch)
tree0003c3c7b37a298835a6bfe622c123abb8d5bcac
parent69c4026ec147f8b8c5d520f02e2a508189e1a510 (diff)
parent7f7bf86bbffee21e577ab559c10f9f3b7ab79e49 (diff)
downloadgitlab-ce-3d1a246f2c9c146d444aad68567eb06b84d82783.tar.gz
Merge pull request #7697 from Razer6/fix_project_shortcuts
Change keyboard shortcut for activity to project
-rw-r--r--app/assets/javascripts/shortcuts_navigation.coffee2
-rw-r--r--app/views/help/_shortcuts.html.haml4
-rw-r--r--app/views/layouts/nav/_project.html.haml2
-rw-r--r--features/project/shortcuts.feature6
4 files changed, 10 insertions, 4 deletions
diff --git a/app/assets/javascripts/shortcuts_navigation.coffee b/app/assets/javascripts/shortcuts_navigation.coffee
index e24a74ea9b6..e592b700e7c 100644
--- a/app/assets/javascripts/shortcuts_navigation.coffee
+++ b/app/assets/javascripts/shortcuts_navigation.coffee
@@ -3,7 +3,7 @@
class @ShortcutsNavigation extends Shortcuts
constructor: ->
super()
- Mousetrap.bind('g a', -> ShortcutsNavigation.findAndollowLink('.shortcuts-activity'))
+ Mousetrap.bind('g p', -> ShortcutsNavigation.findAndollowLink('.shortcuts-project'))
Mousetrap.bind('g f', -> ShortcutsNavigation.findAndollowLink('.shortcuts-tree'))
Mousetrap.bind('g c', -> ShortcutsNavigation.findAndollowLink('.shortcuts-commits'))
Mousetrap.bind('g n', -> ShortcutsNavigation.findAndollowLink('.shortcuts-network'))
diff --git a/app/views/help/_shortcuts.html.haml b/app/views/help/_shortcuts.html.haml
index 4301a6eafc1..467f003b333 100644
--- a/app/views/help/_shortcuts.html.haml
+++ b/app/views/help/_shortcuts.html.haml
@@ -78,9 +78,9 @@
%tr
%td.shortcut
.key g
- .key a
+ .key p
%td
- Go to the activity feed
+ Go to the project's activity feed
%tr
%td.shortcut
.key g
diff --git a/app/views/layouts/nav/_project.html.haml b/app/views/layouts/nav/_project.html.haml
index aadbb31dc96..6cb2a82bac8 100644
--- a/app/views/layouts/nav/_project.html.haml
+++ b/app/views/layouts/nav/_project.html.haml
@@ -1,6 +1,6 @@
%ul.project-navigation
= nav_link(path: 'projects#show', html_options: {class: "home"}) do
- = link_to project_path(@project), title: 'Project', class: 'shortcuts-activity' do
+ = link_to project_path(@project), title: 'Project', class: 'shortcuts-project' do
Project
- if project_nav_tab? :files
= nav_link(controller: %w(tree blob blame edit_tree new_tree)) do
diff --git a/features/project/shortcuts.feature b/features/project/shortcuts.feature
index 16882fded8e..e5f9c103fb1 100644
--- a/features/project/shortcuts.feature
+++ b/features/project/shortcuts.feature
@@ -44,3 +44,9 @@ Feature: Project shortcuts
Scenario: Navigate to wiki tab
Given I press "g" and "w"
Then the active main tab should be Wiki
+
+ @javascript
+ Scenario: Navigate to project feed
+ Given I visit my project's files page
+ Given I press "g" and "p"
+ Then the active main tab should be Home