gitlab-org--gitlab-foss/app/assets/javascripts/user.js.es6

33 lines
770 B
JavaScript
Raw Normal View History

/* eslint-disable */
((global) => {
global.User = class {
constructor({ action }) {
this.action = action;
this.placeProfileAvatarsToTop();
this.initTabs();
this.hideProjectLimitMessage();
}
placeProfileAvatarsToTop() {
$('.profile-groups-avatars').tooltip({
2016-09-01 07:54:10 -04:00
placement: 'top'
});
}
initTabs() {
2016-09-08 08:26:43 -04:00
return new global.UserTabs({
parentEl: '.user-profile',
action: this.action
});
}
hideProjectLimitMessage() {
$('.hide-project-limit-message').on('click', e => {
e.preventDefault();
Cookies.set('hide_project_limit_message', 'false');
$(this).parents('.project-limit-message').remove();
});
}
}
})(window.gl || (window.gl = {}));