diff options
Diffstat (limited to 'app/assets/javascripts/controllers/my/profile_controller.js.coffee')
| -rw-r--r-- | app/assets/javascripts/controllers/my/profile_controller.js.coffee | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/app/assets/javascripts/controllers/my/profile_controller.js.coffee b/app/assets/javascripts/controllers/my/profile_controller.js.coffee new file mode 100644 index 00000000..c429c035 --- /dev/null +++ b/app/assets/javascripts/controllers/my/profile_controller.js.coffee @@ -0,0 +1,18 @@ +class CakeSide.Controllers.My.ProfileController extends Marionette.Controller + views: CakeSide.Views.My.Profiles + initialize: (options) -> + @content_region = CakeSide.Application.content_region + #@comment_view = CakeSide.Application.request('CommentView') + + show: (id) -> + @selectTab() + #@comment_view.hide() + profile = new CakeSide.Models.Profile + id: id + profile.fetch + success: => + @content_region.show(new @views.ShowView(model: profile)) + + selectTab: -> + $('.nav-link').removeClass('active') + $('a[href="/my#profile/me"]').addClass('active') |
