summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2018-01-11 08:52:37 +0000
committerPhil Hughes <me@iamphill.com>2018-01-11 08:52:37 +0000
commit21bb393378c864d1715c252e7523e7ca3f70472b (patch)
tree653bc9a62d64b60e776f88c1cf5e763727582012 /app
parentbf3c54bfd512fe7e361d559776308caf7cd1614a (diff)
parentea77456df36850385270c49fb3bbb0fb4764596e (diff)
downloadgitlab-ce-21bb393378c864d1715c252e7523e7ca3f70472b.tar.gz
Merge branch 'dispatcher-sessions' into 'master'
Refactor dispatcher sessions path See merge request gitlab-org/gitlab-ce!16362
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/dispatcher.js9
-rw-r--r--app/assets/javascripts/pages/sessions/new/index.js11
-rw-r--r--app/assets/javascripts/pages/sessions/new/oauth_remember_me.js (renamed from app/assets/javascripts/oauth_remember_me.js)0
-rw-r--r--app/assets/javascripts/pages/sessions/new/signin_tabs_memoizer.js (renamed from app/assets/javascripts/signin_tabs_memoizer.js)2
-rw-r--r--app/assets/javascripts/pages/sessions/new/username_validator.js (renamed from app/assets/javascripts/username_validator.js)0
5 files changed, 15 insertions, 7 deletions
diff --git a/app/assets/javascripts/dispatcher.js b/app/assets/javascripts/dispatcher.js
index 67c736ebfc6..9d9605045fb 100644
--- a/app/assets/javascripts/dispatcher.js
+++ b/app/assets/javascripts/dispatcher.js
@@ -49,17 +49,14 @@ import UsersSelect from './users_select';
import RefSelectDropdown from './ref_select_dropdown';
import GfmAutoComplete from './gfm_auto_complete';
import ShortcutsBlob from './shortcuts_blob';
-import SigninTabsMemoizer from './signin_tabs_memoizer';
import Star from './star';
import TreeView from './tree';
import UsagePing from './usage_ping';
-import UsernameValidator from './username_validator';
import VersionCheckImage from './version_check_image';
import Wikis from './wikis';
import ZenMode from './zen_mode';
import initSettingsPanels from './settings_panels';
import initExperimentalFlags from './experimental_flags';
-import OAuthRememberMe from './oauth_remember_me';
import PerformanceBar from './performance_bar';
import initBroadcastMessagesForm from './broadcast_message';
import initNotes from './init_notes';
@@ -157,9 +154,9 @@ import Activities from './activities';
initExperimentalFlags();
break;
case 'sessions:new':
- new UsernameValidator();
- new SigninTabsMemoizer();
- new OAuthRememberMe({ container: $(".omniauth-container") }).bindEvents();
+ import('./pages/sessions/new')
+ .then(callDefault)
+ .catch(fail);
break;
case 'projects:boards:show':
case 'projects:boards:index':
diff --git a/app/assets/javascripts/pages/sessions/new/index.js b/app/assets/javascripts/pages/sessions/new/index.js
new file mode 100644
index 00000000000..f163557babc
--- /dev/null
+++ b/app/assets/javascripts/pages/sessions/new/index.js
@@ -0,0 +1,11 @@
+import UsernameValidator from './username_validator';
+import SigninTabsMemoizer from './signin_tabs_memoizer';
+import OAuthRememberMe from './oauth_remember_me';
+
+export default () => {
+ new UsernameValidator(); // eslint-disable-line no-new
+ new SigninTabsMemoizer(); // eslint-disable-line no-new
+ new OAuthRememberMe({ // eslint-disable-line no-new
+ container: $('.omniauth-container'),
+ }).bindEvents();
+};
diff --git a/app/assets/javascripts/oauth_remember_me.js b/app/assets/javascripts/pages/sessions/new/oauth_remember_me.js
index ffc2dd6bbca..ffc2dd6bbca 100644
--- a/app/assets/javascripts/oauth_remember_me.js
+++ b/app/assets/javascripts/pages/sessions/new/oauth_remember_me.js
diff --git a/app/assets/javascripts/signin_tabs_memoizer.js b/app/assets/javascripts/pages/sessions/new/signin_tabs_memoizer.js
index 20255398047..f99573e5c74 100644
--- a/app/assets/javascripts/signin_tabs_memoizer.js
+++ b/app/assets/javascripts/pages/sessions/new/signin_tabs_memoizer.js
@@ -1,6 +1,6 @@
/* eslint no-param-reassign: ["error", { "props": false }]*/
/* eslint no-new: "off" */
-import AccessorUtilities from './lib/utils/accessor';
+import AccessorUtilities from '~/lib/utils/accessor';
/**
* Memorize the last selected tab after reloading a page.
diff --git a/app/assets/javascripts/username_validator.js b/app/assets/javascripts/pages/sessions/new/username_validator.js
index bb34d5d2008..bb34d5d2008 100644
--- a/app/assets/javascripts/username_validator.js
+++ b/app/assets/javascripts/pages/sessions/new/username_validator.js