diff options
author | Phil Hughes <me@iamphill.com> | 2018-01-11 08:48:47 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2018-01-11 08:48:47 +0000 |
commit | bf3c54bfd512fe7e361d559776308caf7cd1614a (patch) | |
tree | 53acc27d477d240acc7bb3a6e61a91bb0091eff0 /app | |
parent | 3735375f4c5a0d83fbf6398e6e6cabfcfee25c25 (diff) | |
parent | 62928a3f127907776a43b5503fbbff186eafa96f (diff) | |
download | gitlab-ce-bf3c54bfd512fe7e361d559776308caf7cd1614a.tar.gz |
Merge branch 'dispatcher-search' into 'master'
Refactor dispatcher search path
See merge request gitlab-org/gitlab-ce!16366
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/dispatcher.js | 5 | ||||
-rw-r--r-- | app/assets/javascripts/pages/search/show/index.js | 3 | ||||
-rw-r--r-- | app/assets/javascripts/pages/search/show/search.js (renamed from app/assets/javascripts/search.js) | 4 |
3 files changed, 8 insertions, 4 deletions
diff --git a/app/assets/javascripts/dispatcher.js b/app/assets/javascripts/dispatcher.js index 212b6082e37..67c736ebfc6 100644 --- a/app/assets/javascripts/dispatcher.js +++ b/app/assets/javascripts/dispatcher.js @@ -13,7 +13,6 @@ import groupAvatar from './group_avatar'; import GroupLabelSubscription from './group_label_subscription'; import LineHighlighter from './line_highlighter'; import groupsSelect from './groups_select'; -import Search from './search'; import initAdmin from './admin'; import NamespaceSelect from './namespace_select'; import NewCommitForm from './new_commit_form'; @@ -529,7 +528,9 @@ import Activities from './activities'; VersionCheckImage.bindErrorEvent($('img.js-version-status-badge')); break; case 'search:show': - new Search(); + import('./pages/search/show') + .then(callDefault) + .catch(fail); break; case 'projects:settings:repository:show': // Initialize expandable settings panels diff --git a/app/assets/javascripts/pages/search/show/index.js b/app/assets/javascripts/pages/search/show/index.js new file mode 100644 index 00000000000..4264c5c9dbe --- /dev/null +++ b/app/assets/javascripts/pages/search/show/index.js @@ -0,0 +1,3 @@ +import Search from './search'; + +export default () => new Search(); diff --git a/app/assets/javascripts/search.js b/app/assets/javascripts/pages/search/show/search.js index 363322af47a..d44195f6b72 100644 --- a/app/assets/javascripts/search.js +++ b/app/assets/javascripts/pages/search/show/search.js @@ -1,5 +1,5 @@ -import Flash from './flash'; -import Api from './api'; +import Flash from '~/flash'; +import Api from '~/api'; export default class Search { constructor() { |