diff options
author | Jose Ivan Vargas <jvargas@gitlab.com> | 2017-10-11 22:03:19 +0300 |
---|---|---|
committer | Jose Ivan Vargas <jvargas@gitlab.com> | 2017-10-11 22:03:19 +0300 |
commit | 16a97d644c442f67ff23caa4d744d8cfa06f144b (patch) | |
tree | e1c07b07361a8cf29994a57d3f996c6e19a46ec5 /app | |
parent | efeaf3bd41e60be1405b7e3ccfcfb6cb4747518c (diff) |
Removed d3.js from the users and graphs bundle
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/dispatcher.js | 6 | ||||
-rw-r--r-- | app/assets/javascripts/users/index.js | 8 | ||||
-rw-r--r-- | app/views/users/show.html.haml | 3 |
3 files changed, 10 insertions, 7 deletions
diff --git a/app/assets/javascripts/dispatcher.js b/app/assets/javascripts/dispatcher.js index 4442e2ebf44..0a653d7fefc 100644 --- a/app/assets/javascripts/dispatcher.js +++ b/app/assets/javascripts/dispatcher.js @@ -634,12 +634,6 @@ import U2FAuthenticate from './u2f/authenticate'; shortcut_handler = new ShortcutsNavigation(); } break; - case 'users': - const action = path[1]; - import(/* webpackChunkName: 'user_profile' */ './users') - .then(user => user.default(action)) - .catch(() => {}); - break; } // If we haven't installed a custom shortcut handler, install the default one if (!shortcut_handler) { diff --git a/app/assets/javascripts/users/index.js b/app/assets/javascripts/users/index.js index 33a83f8dae5..9fd8452a2b6 100644 --- a/app/assets/javascripts/users/index.js +++ b/app/assets/javascripts/users/index.js @@ -1,7 +1,7 @@ import Cookies from 'js-cookie'; import UserTabs from './user_tabs'; -export default function initUserProfile(action) { +function initUserProfile(action) { // place profile avatars to top $('.profile-groups-avatars').tooltip({ placement: 'top', @@ -17,3 +17,9 @@ export default function initUserProfile(action) { $(this).parents('.project-limit-message').remove(); }); } + +document.addEventListener('DOMContentLoaded', () => { + const page = $('body').attr('data-page'); + const action = page.split(':')[1]; + initUserProfile(action); +}); diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml index 6c3cd6ecefe..cc59f8660fd 100644 --- a/app/views/users/show.html.haml +++ b/app/views/users/show.html.haml @@ -4,6 +4,9 @@ - page_description @user.bio - header_title @user.name, user_path(@user) - @no_container = true +- content_for :page_specific_javascripts do + = webpack_bundle_tag 'common_d3' + = webpack_bundle_tag 'users' = content_for :meta_tags do = auto_discovery_link_tag(:atom, user_url(@user, format: :atom), title: "#{@user.name} activity") |