diff --git a/plugins/Actions/javascripts/actionsDataTable.js b/plugins/Actions/javascripts/actionsDataTable.js index ad64445c22ccf32e7afbc7a9cd6ddc7a5a87f629..ef8442e1bd65988d88fafaf946bc1ab61d698c93 100644 --- a/plugins/Actions/javascripts/actionsDataTable.js +++ b/plugins/Actions/javascripts/actionsDataTable.js @@ -318,7 +318,12 @@ $('tr#' + idToReplace, root).after(response).remove(); - var missingColumns = (response.prev().find('td').size() - response.find('td').size()); + var requiredColumnCount = 0, availableColumnCount = 0; + + response.prev().find('td').each(function(){ requiredColumnCount += $(this).attr('colspan') || 1; }); + response.find('td').each(function(){ availableColumnCount += $(this).attr('colspan') || 1; }); + + var missingColumns = requiredColumnCount - availableColumnCount; for (var i = 0; i < missingColumns; i++) { // if the subtable has fewer columns than the parent table, add some columns. // this happens for example, when the parent table has performance metrics and the subtable doesn't.