diff options
author | Phil Hughes <me@iamphill.com> | 2016-10-03 11:10:20 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-10-03 11:10:20 +0300 |
commit | cc88fa4d5be9ec0d5fb42f1bb5efa0b82f30a589 (patch) | |
tree | 1b9facaf15466aa7f5b0393e97cb1eabfdcafa7e /app/assets/javascripts/dispatcher.js | |
parent | 69db604e55de2bdf1a28c274be6cc9131534517d (diff) | |
parent | f2c0f8237124d2dc539120bd77f301f216453cb7 (diff) |
Merge branch 'master' into revert-c676283b
Diffstat (limited to 'app/assets/javascripts/dispatcher.js')
-rw-r--r-- | app/assets/javascripts/dispatcher.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/assets/javascripts/dispatcher.js b/app/assets/javascripts/dispatcher.js index a72beb42646..aedffeea2a2 100644 --- a/app/assets/javascripts/dispatcher.js +++ b/app/assets/javascripts/dispatcher.js @@ -23,6 +23,7 @@ case 'projects:boards:show': shortcut_handler = new ShortcutsNavigation(); break; + case 'projects:merge_requests:index': case 'projects:issues:index': Issuable.init(); new IssuableBulkActions(); @@ -97,6 +98,7 @@ break; case "projects:merge_requests:conflicts": window.mcui = new MergeConflictResolver() + break; case 'projects:merge_requests:index': shortcut_handler = new ShortcutsNavigation(); Issuable.init(); @@ -171,6 +173,8 @@ } break; case 'projects:network:show': + // Ensure we don't create a particular shortcut handler here. This is + // already created, where the network graph is created. shortcut_handler = true; break; case 'projects:forks:new': @@ -190,6 +194,9 @@ new gl.ProtectedBranchCreate(); new gl.ProtectedBranchEditList(); break; + case 'projects:cycle_analytics:show': + new gl.CycleAnalytics(); + break; } switch (path.first()) { case 'admin': @@ -267,12 +274,14 @@ shortcut_handler = new ShortcutsNavigation(); } } + // If we haven't installed a custom shortcut handler, install the default one if (!shortcut_handler) { return new Shortcuts(); } }; Dispatcher.prototype.initSearch = function() { + // Only when search form is present if ($('.search').length) { return new SearchAutocomplete(); } |