debian-mirror-gitlab/app/assets/javascripts/pages/users/index.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
667 B
JavaScript
Raw Normal View History

2018-05-09 12:01:36 +05:30
import $ from 'jquery';
2022-04-04 11:22:00 +05:30
import { setCookie } from '~/lib/utils/common_utils';
2020-01-01 13:55:28 +05:30
import UserCallout from '~/user_callout';
2017-09-10 17:25:29 +05:30
import UserTabs from './user_tabs';
2018-03-17 18:26:18 +05:30
function initUserProfile(action) {
2017-09-10 17:25:29 +05:30
// eslint-disable-next-line no-new
new UserTabs({ parentEl: '.user-profile', action });
// hide project limit message
2021-03-08 18:12:59 +05:30
$('.hide-project-limit-message').on('click', (e) => {
2017-09-10 17:25:29 +05:30
e.preventDefault();
2022-04-04 11:22:00 +05:30
setCookie('hide_project_limit_message', 'false');
2021-03-08 18:12:59 +05:30
$(this).parents('.project-limit-message').remove();
2017-09-10 17:25:29 +05:30
});
}
2018-03-17 18:26:18 +05:30
2021-04-17 20:07:23 +05:30
const page = $('body').attr('data-page');
const action = page.split(':')[1];
initUserProfile(action);
new UserCallout(); // eslint-disable-line no-new