From 1cf37e1b533f6ee26095ee5450971f5b9638316f Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Wed, 23 Oct 2013 08:30:46 +0200 Subject: [PATCH] Use click to open user in new task. --- .../app/controllers/_application_controller.js.coffee | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/assets/javascripts/app/controllers/_application_controller.js.coffee b/app/assets/javascripts/app/controllers/_application_controller.js.coffee index 599f240de..be39821f9 100644 --- a/app/assets/javascripts/app/controllers/_application_controller.js.coffee +++ b/app/assets/javascripts/app/controllers/_application_controller.js.coffee @@ -311,6 +311,14 @@ class App.Controller extends Spine.Controller # remove old popovers $('.popover').remove() + # open user in new task if user isn't customer + if !@isRole('Customer') + @el.find('.user-popover').bind('click', (e) => + user_id = $(e.target).data('id') + @navigate "#user/zoom/#{user_id}" + $('.popover').remove() + ); + # show user popup @el.find('.user-popover').popover( trigger: 'hover'