From 6cffb8c576ff4ea57a6b92d77f963d830102fc36 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Tue, 10 Feb 2015 13:27:52 +0100 Subject: [PATCH] Fixed broken markup in popover for users tickets. --- .../controllers/_application_controller.js.coffee | 12 +++++++++--- .../app/views/popover/user_ticket_list.jst.eco | 5 ++++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/app/assets/javascripts/app/controllers/_application_controller.js.coffee b/app/assets/javascripts/app/controllers/_application_controller.js.coffee index c106e7e2d..d641dfe31 100644 --- a/app/assets/javascripts/app/controllers/_application_controller.js.coffee +++ b/app/assets/javascripts/app/controllers/_application_controller.js.coffee @@ -386,7 +386,7 @@ class App.Controller extends Spine.Controller @userTicketPopupsDestroy() # show user popup - controller = @ + ui = @ @userTicketPopupsList = @el.find(data.selector).popover( trigger: 'hover' container: 'body' @@ -405,9 +405,15 @@ class App.Controller extends Spine.Controller tickets.push App.Ticket.fullLocal( ticket_id ) # insert data - App.view('popover/user_ticket_list')( - tickets: tickets, + html = App.view('popover/user_ticket_list')( + tickets: tickets ) + html = $( html ) + html.find('.humanTimeFromNow').each( -> + item = $(this) + ui.frontendTimeUpdateItem(item) + ) + html ) fetch = (params) => diff --git a/app/assets/javascripts/app/views/popover/user_ticket_list.jst.eco b/app/assets/javascripts/app/views/popover/user_ticket_list.jst.eco index 90e8e2938..0d7388eeb 100644 --- a/app/assets/javascripts/app/views/popover/user_ticket_list.jst.eco +++ b/app/assets/javascripts/app/views/popover/user_ticket_list.jst.eco @@ -1,5 +1,8 @@