diff options
author | Timothy Andrew <mail@timothyandrew.net> | 2016-09-20 12:18:13 +0300 |
---|---|---|
committer | Timothy Andrew <mail@timothyandrew.net> | 2016-09-20 12:18:13 +0300 |
commit | fa890604aaf15b9e4f0199e6a4cff24c29955a37 (patch) | |
tree | 1606c5585a93d3c0449effbe7b5cc901900833dd /app/assets/javascripts/dispatcher.js | |
parent | 0b97b42d60a662c0d138c44f6dbd05a3048ac349 (diff) | |
parent | 95b9421ad3b2678da6e0af0131eafd52cdd0b2a5 (diff) |
Merge remote-tracking branch 'origin/master' into 21170-cycle-analytics
Diffstat (limited to 'app/assets/javascripts/dispatcher.js')
-rw-r--r-- | app/assets/javascripts/dispatcher.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/assets/javascripts/dispatcher.js b/app/assets/javascripts/dispatcher.js index 6e620e9976c..ddf11ecf34c 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(); @@ -92,7 +93,8 @@ new MergedButtons(); break; case "projects:merge_requests:conflicts": - new MergeConflictResolver() + window.mcui = new MergeConflictResolver() + break; case 'projects:merge_requests:index': shortcut_handler = new ShortcutsNavigation(); Issuable.init(); @@ -167,6 +169,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': @@ -266,12 +270,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(); } |