diff --git a/app/assets/javascripts/app/controllers/ticket_overview.coffee b/app/assets/javascripts/app/controllers/ticket_overview.coffee index 3ab920d7c..116a9021c 100644 --- a/app/assets/javascripts/app/controllers/ticket_overview.coffee +++ b/app/assets/javascripts/app/controllers/ticket_overview.coffee @@ -21,8 +21,8 @@ class App.TicketOverview extends App.Controller events: 'mousedown .item': 'startDragItem' - 'mouseenter .js-batch-overlay-entry': 'highlightBatchEntry' - 'mouseleave .js-batch-overlay-entry': 'unhighlightBatchEntry' + 'mouseenter .js-hover-target': 'highlightBatchEntry' + 'mouseleave .js-hover-target': 'unhighlightBatchEntry' constructor: -> super @@ -492,26 +492,27 @@ class App.TicketOverview extends App.Controller @batchMacroShown = false highlightBatchEntryAtMousePosition: => - entryAtPoint = $(document.elementFromPoint(@mouse.x, @mouse.y)).closest('.js-batch-overlay-entry') + entryAtPoint = $(document.elementFromPoint(@mouse.x, @mouse.y)).closest('.js-batch-overlay-entry .avatar') if(entryAtPoint.length) - @hoveredBatchEntry = entryAtPoint.addClass('is-hovered') + @hoveredBatchEntry = entryAtPoint.closest('.js-batch-overlay-entry').addClass('is-hovered') highlightBatchEntry: (event) -> - @hoveredBatchEntry = $(event.currentTarget).addClass('is-hovered') + @hoveredBatchEntry = $(event.currentTarget).closest('.js-batch-overlay-entry').addClass('is-hovered') if @hoveredBatchEntry.attr('data-action') is 'group_assign' @batchAssignGroupHintTimeout = setTimeout @blinkBatchEntry, 800 @batchAssignGroupTimeout = setTimeout @showBatchAssignGroup, 900 unhighlightBatchEntry: (event) -> + return if !@hoveredBatchEntry if @hoveredBatchEntry.attr('data-action') is 'group_assign' if @batchAssignGroupTimeout clearTimeout @batchAssignGroupTimeout if @batchAssignGroupHintTimeout clearTimeout @batchAssignGroupHintTimeout + @hoveredBatchEntry.removeClass('is-hovered') @hoveredBatchEntry = null - $(event.currentTarget).removeClass('is-hovered') blinkBatchEntry: => @hoveredBatchEntry diff --git a/app/assets/javascripts/app/views/ticket_overview/batch_overlay_macro.jst.eco b/app/assets/javascripts/app/views/ticket_overview/batch_overlay_macro.jst.eco index 8f490f314..35db0dedc 100644 --- a/app/assets/javascripts/app/views/ticket_overview/batch_overlay_macro.jst.eco +++ b/app/assets/javascripts/app/views/ticket_overview/batch_overlay_macro.jst.eco @@ -1,7 +1,9 @@
\ No newline at end of file diff --git a/app/assets/javascripts/app/views/ticket_overview/batch_overlay_user_group.jst.eco b/app/assets/javascripts/app/views/ticket_overview/batch_overlay_user_group.jst.eco index 956b89425..488df0200 100644 --- a/app/assets/javascripts/app/views/ticket_overview/batch_overlay_user_group.jst.eco +++ b/app/assets/javascripts/app/views/ticket_overview/batch_overlay_user_group.jst.eco @@ -1,12 +1,12 @@ <% for user in @users: %> <% end %> <% for group in @groups: %>