From bc3f33f92a16d3afdb8a472f60940e7c46a31564 Mon Sep 17 00:00:00 2001 From: Fatih Acet Date: Fri, 22 Jul 2016 17:01:57 +0300 Subject: JSify all the things! --- app/assets/javascripts/user.js | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 app/assets/javascripts/user.js (limited to 'app/assets/javascripts/user.js') diff --git a/app/assets/javascripts/user.js b/app/assets/javascripts/user.js new file mode 100644 index 00000000000..3cab0db65a2 --- /dev/null +++ b/app/assets/javascripts/user.js @@ -0,0 +1,28 @@ +this.User = (function() { + function User(opts) { + this.opts = opts; + $('.profile-groups-avatars').tooltip({ + "placement": "top" + }); + this.initTabs(); + $('.hide-project-limit-message').on('click', function(e) { + var path; + path = '/'; + $.cookie('hide_project_limit_message', 'false', { + path: path + }); + $(this).parents('.project-limit-message').remove(); + return e.preventDefault(); + }); + } + + User.prototype.initTabs = function() { + return new UserTabs({ + parentEl: '.user-profile', + action: this.opts.action + }); + }; + + return User; + +})(); -- cgit v1.2.1