From 92fca531f11dde34ed5c3e4538d5559e338adfbf Mon Sep 17 00:00:00 2001 From: webchick Date: Tue, 14 Feb 2012 13:52:40 -0500 Subject: Issue #1319420 by nod_: Fixed multiple execution of tableselect.js with nested tables. --- misc/tableselect.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'misc') diff --git a/misc/tableselect.js b/misc/tableselect.js index 8cf7f3622..f201a88b0 100644 --- a/misc/tableselect.js +++ b/misc/tableselect.js @@ -2,7 +2,8 @@ Drupal.behaviors.tableSelect = { attach: function (context, settings) { - $('table:has(th.select-all)', context).once('table-select', Drupal.tableSelect); + // Select the inner-most table in case of nested tables. + $('th.select-all', context).closest('table').once('table-select', Drupal.tableSelect); } }; -- cgit v1.2.3