Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Schatz <jschatz@gitlab.com>2016-06-15 23:30:40 +0300
committerRobert Speicher <rspeicher@gmail.com>2016-06-16 03:52:28 +0300
commit063535bee62c100014d2b6acda4ad8a8856d08d8 (patch)
tree7d2d5bc54617787de4cf88da8fc2a7171fcaea43 /app/assets/javascripts
parent8191accedc2707a2943657e5cb6a7fbbd2284339 (diff)
Merge branch '17929-issue-shortcut-doesnt-work-on-some-pages' into 'master'
New issue shortcut doesnt work on some pages ## What does this MR do? 1. Slightly tidies dispatcher switch case by utilising 'fall through' cases. 2. Adds shortcuts to project pipelines, milestones, builds and forks pages ## Are there points in the code the reviewer needs to double check? I have a feeling that these may have been missed out of the case statements on purpose? ## Why was this MR needed? Possible UX issue highlighted in #17929. ## What are the relevant issue numbers? Closes #17929. Closes #12616. (dup) Closes #18123. (dup) Closes #13688. (dup) ## Screenshots (if relevant) See merge request !4393
Diffstat (limited to 'app/assets/javascripts')
-rw-r--r--app/assets/javascripts/dispatcher.js.coffee16
1 files changed, 5 insertions, 11 deletions
diff --git a/app/assets/javascripts/dispatcher.js.coffee b/app/assets/javascripts/dispatcher.js.coffee
index 8b39e6b090c..68ced4e4b03 100644
--- a/app/assets/javascripts/dispatcher.js.coffee
+++ b/app/assets/javascripts/dispatcher.js.coffee
@@ -72,9 +72,7 @@ class Dispatcher
new Diff()
new ZenMode()
shortcut_handler = new ShortcutsNavigation()
- when 'projects:commits:show'
- shortcut_handler = new ShortcutsNavigation()
- when 'projects:activity'
+ when 'projects:commits:show', 'projects:activity'
shortcut_handler = new ShortcutsNavigation()
when 'projects:show'
shortcut_handler = new ShortcutsNavigation()
@@ -133,15 +131,11 @@ class Dispatcher
new Project()
new ProjectAvatar()
switch path[1]
- when 'compare'
- shortcut_handler = new ShortcutsNavigation()
when 'edit'
shortcut_handler = new ShortcutsNavigation()
new ProjectNew()
- when 'new'
+ when 'new', 'show'
new ProjectNew()
- when 'show'
- new ProjectShow()
when 'wikis'
new Wikis()
shortcut_handler = new ShortcutsNavigation()
@@ -150,9 +144,9 @@ class Dispatcher
when 'snippets'
shortcut_handler = new ShortcutsNavigation()
new ZenMode() if path[2] == 'show'
- when 'labels', 'graphs'
- shortcut_handler = new ShortcutsNavigation()
- when 'project_members', 'deploy_keys', 'hooks', 'services', 'protected_branches'
+ when 'labels', 'graphs', 'compare', 'pipelines', 'forks', \
+ 'milestones', 'project_members', 'deploy_keys', 'builds', \
+ 'hooks', 'services', 'protected_branches'
shortcut_handler = new ShortcutsNavigation()
# If we haven't installed a custom shortcut handler, install the default one