diff options
Diffstat (limited to 'app/assets/javascripts/user.js.es6')
-rw-r--r-- | app/assets/javascripts/user.js.es6 | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/app/assets/javascripts/user.js.es6 b/app/assets/javascripts/user.js.es6 new file mode 100644 index 00000000000..5e869e99fdb --- /dev/null +++ b/app/assets/javascripts/user.js.es6 @@ -0,0 +1,32 @@ +/* eslint-disable */ +((global) => { + global.User = class { + constructor({ action }) { + this.action = action; + this.placeProfileAvatarsToTop(); + this.initTabs(); + this.hideProjectLimitMessage(); + } + + placeProfileAvatarsToTop() { + $('.profile-groups-avatars').tooltip({ + placement: 'top' + }); + } + + initTabs() { + 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 = {})); |