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:
authorPeter Zhang <peter@innocraft.com>2022-02-24 00:35:03 +0300
committerGitHub <noreply@github.com>2022-02-24 00:35:03 +0300
commite5e1ec65b191582b96474a2f95db278b1170d389 (patch)
tree87bb891ed4eb1b4696086b032dc6e27cf4935e60
parentd9945582eb1ff56d9c99f78ff17e8a4fcbc97f25 (diff)
[Regression] Expand event name table column change the table size. (#18728)
* Update dataTable.js update database table * Update dataTable.js update table bug * Update dataTable.js shorter the query * update screenshot update screenshot * Update dataTable.js make table size stable * Revert "Update dataTable.js" This reverts commit 1a72e1d9580172414fb147cda9e66f4927f4b2ae. * Update dataTable.js update columns * Revert "update screenshot" This reverts commit c11aec88af44668171d2ee14e7a502b5fb04126f. Co-authored-by: sgiehl <stefan@matomo.org>
-rw-r--r--plugins/CoreHome/javascripts/dataTable.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/plugins/CoreHome/javascripts/dataTable.js b/plugins/CoreHome/javascripts/dataTable.js
index 8d19e71752..4287092033 100644
--- a/plugins/CoreHome/javascripts/dataTable.js
+++ b/plugins/CoreHome/javascripts/dataTable.js
@@ -485,8 +485,14 @@ $.extend(DataTable.prototype, UIControl.prototype, {
) {
labelWidth = maxLabelWidth; // prevent for instance table in Actions-Pages is not too wide
}
+ var allColumns = $('tr:nth-child(1) td.label', domElem).length;
+ var firstTableColumn = $('table:first tbody>tr:first td.label', domElem).length;
+ var amount = allColumns;
+ if (allColumns > 2 * firstTableColumn) {
+ amount = 2 * firstTableColumn;
+ }
- return parseInt(labelWidth / $('tr:nth-child(1) td.label', domElem).length, 10);
+ return parseInt(labelWidth / amount, 10);
}
function getLabelColumnMinWidth(domElem)
@@ -557,7 +563,6 @@ $.extend(DataTable.prototype, UIControl.prototype, {
var labelColumnMinWidth = getLabelColumnMinWidth(domElem);
var labelColumnMaxWidth = getLabelColumnMaxWidth(domElem);
var labelColumnWidth = getLabelWidth(domElem, tableWidth, 125, 440);
-
if (labelColumnMinWidth > labelColumnWidth) {
labelColumnWidth = labelColumnMinWidth;
}