From 05917f6fd8c331faec261b9b61ae8e4a302703f9 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Fri, 4 Jan 2013 11:13:45 +0100 Subject: [PATCH] Fixed #19 - deselect bulk action box if one item got deselected. --- .../javascripts/app/controllers/agent_ticket_view.js.coffee | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/assets/javascripts/app/controllers/agent_ticket_view.js.coffee b/app/assets/javascripts/app/controllers/agent_ticket_view.js.coffee index 84a0fdda1..77abd5090 100644 --- a/app/assets/javascripts/app/controllers/agent_ticket_view.js.coffee +++ b/app/assets/javascripts/app/controllers/agent_ticket_view.js.coffee @@ -227,6 +227,12 @@ class Index extends App.Controller @el.find('.bulk-action').removeClass('hide') ) + # deselect bulk_all if one item is uncheck observ + @el.find('.table-overview').delegate('[name="bulk"]', 'click', (e) => + if !$(e.target).attr('checked') + $(e.target).parents().find('[name="bulk_all"]').attr('checked', false) + ) + page: (e) => e.preventDefault() id = $(e.target).data('id')