From c05c4da9840b909c7317e2dbb3ebbf8d8f13b6ab Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20Pracha=C5=99?= Date: Tue, 1 Feb 2011 22:50:18 +0100 Subject: [PATCH] Do not change table row state when clicked on an anchor or inside a form element in inline editing mode. --- js/functions.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/js/functions.js b/js/functions.js index 542305e32..e445b92c9 100644 --- a/js/functions.js +++ b/js/functions.js @@ -906,10 +906,13 @@ $(document).ready(function() { * next pages reached via AJAX); a tr may have the class noclick to remove * this behavior. */ - $('tr.odd:not(.noclick), tr.even:not(.noclick)').live('click',function() { - var $tr = $(this); - $tr.toggleClass('marked'); - $tr.children().toggleClass('marked'); + $('tr.odd:not(.noclick), tr.even:not(.noclick)').live('click',function(e) { + //do not trigger when clicked on anchor or inside input element (in inline editing mode) with exception of the first checkbox + if (!jQuery(e.target).is('a, a *, :input:not([name^="rows_to_delete"])')) { + var $tr = $(this); + $tr.toggleClass('marked'); + $tr.children().toggleClass('marked'); + } }); /** -- 2.11.4.GIT