From 7fd6176c6a6029cf33909529021e778d416c600d Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Wed, 17 Oct 2012 22:53:42 +0200 Subject: [PATCH] Fixed not shown user in ticket zoom if user isn't already available in local collection. --- .../app/controllers/agent_ticket_customer.js.coffee | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/app/assets/javascripts/app/controllers/agent_ticket_customer.js.coffee b/app/assets/javascripts/app/controllers/agent_ticket_customer.js.coffee index e8d10be3a..11bd3a69d 100644 --- a/app/assets/javascripts/app/controllers/agent_ticket_customer.js.coffee +++ b/app/assets/javascripts/app/controllers/agent_ticket_customer.js.coffee @@ -32,8 +32,13 @@ class App.TicketCustomer extends App.ControllerModal customer_id: params['customer_id'] ) - # close modal - @modalHide() + callback = => - # reload zoom view - @zoom.render() + # close modal + @modalHide() + + # reload zoom view + @zoom.render() + + # load user if not already exists + App.Collection.find( 'User', params['customer_id'], callback )