Do not change table row state when clicked on an anchor or inside a form element in inline editing mode.

This commit is contained in:
Jan Prachař
2011-02-01 22:50:18 +01:00
committed by Marc Delisle
parent 8a394db00c
commit c05c4da984

View File

@@ -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');
}
});
/**