From 7500befb81710dc50a734e2398ba19ba213f8fff Mon Sep 17 00:00:00 2001 From: Dries Date: Thu, 2 Feb 2012 13:13:06 -0500 Subject: [PATCH] - Patch #1319420 by nod_: multiple execution of tableselect.js with nested tables. --- core/misc/tableselect.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/misc/tableselect.js b/core/misc/tableselect.js index 904adb9dfba..cc4beb0dc9d 100644 --- a/core/misc/tableselect.js +++ b/core/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); } };