Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsgiehl <stefan@piwik.org>2016-01-05 02:57:04 +0300
committersgiehl <stefan@piwik.org>2016-01-05 20:04:44 +0300
commita5030e5116ffb7430d65689473fefdf8146dcb15 (patch)
treedc25279681477356ba2e17656cf527a79d617698 /plugins/Actions/javascripts
parentb0487d397fd0a61811361676878eeb9abc41276d (diff)
fix calculation of fillup columns for subtables
Diffstat (limited to 'plugins/Actions/javascripts')
-rw-r--r--plugins/Actions/javascripts/actionsDataTable.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/Actions/javascripts/actionsDataTable.js b/plugins/Actions/javascripts/actionsDataTable.js
index ad64445c22..ef8442e1bd 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.