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:

committed by
Marc Delisle

parent
8a394db00c
commit
c05c4da984
@@ -906,10 +906,13 @@ $(document).ready(function() {
|
|||||||
* next pages reached via AJAX); a tr may have the class noclick to remove
|
* next pages reached via AJAX); a tr may have the class noclick to remove
|
||||||
* this behavior.
|
* this behavior.
|
||||||
*/
|
*/
|
||||||
$('tr.odd:not(.noclick), tr.even:not(.noclick)').live('click',function() {
|
$('tr.odd:not(.noclick), tr.even:not(.noclick)').live('click',function(e) {
|
||||||
var $tr = $(this);
|
//do not trigger when clicked on anchor or inside input element (in inline editing mode) with exception of the first checkbox
|
||||||
$tr.toggleClass('marked');
|
if (!jQuery(e.target).is('a, a *, :input:not([name^="rows_to_delete"])')) {
|
||||||
$tr.children().toggleClass('marked');
|
var $tr = $(this);
|
||||||
|
$tr.toggleClass('marked');
|
||||||
|
$tr.children().toggleClass('marked');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user