From a6d6042bd74c09dbbfa150360535d9ad04fc5603 Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Wed, 30 Oct 2024 19:02:14 +0200 Subject: [PATCH] cleanup --- client/res/templates/record/list.tpl | 3 +- client/src/views/record/list.js | 55 ---------------------------- 2 files changed, 1 insertion(+), 57 deletions(-) diff --git a/client/res/templates/record/list.tpl b/client/res/templates/record/list.tpl index 53e12b7d82..d70b6d0ab8 100644 --- a/client/res/templates/record/list.tpl +++ b/client/res/templates/record/list.tpl @@ -138,13 +138,12 @@ {{#if collectionLength}}
{{#if header}} diff --git a/client/src/views/record/list.js b/client/src/views/record/list.js index 8570d8d0fd..2c2e7d8d67 100644 --- a/client/src/views/record/list.js +++ b/client/src/views/record/list.js @@ -185,9 +185,6 @@ class ListRecordView extends View { /** @protected */ checkboxColumnWidth = 40 - /** @protected */ - minColumnWidth = 100 - /** * A button. Handled by a class method `action{Name}` or a handler. * @@ -3485,58 +3482,6 @@ class ListRecordView extends View { return this.checkedList.indexOf(id) !== -1; } - // noinspection JSUnusedGlobalSymbols - getTableMinWidth() { - if (!this.listLayout) { - return; - } - - const factor = this._fontSizeFactor; - - let totalWidth = 0; - let totalWidthPx = 0; - let emptyCount = 0; - let columnCount = 0; - - this.listLayout.forEach((item) => { - columnCount ++; - - if (item.widthPx) { - totalWidthPx += item.widthPx; - - return; - } - - if (item.width) { - totalWidth += item.width; - - return; - } - - emptyCount ++; - }); - - if (this.rowActionsView && !this.rowActionsDisabled) { - totalWidthPx += this.rowActionsColumnWidth; - } - - if (this.checkboxes) { - totalWidthPx += this.checkboxColumnWidth; - } - - let minWidth; - - if (totalWidth >= 100 * factor) { - minWidth = columnCount * this.minColumnWidth * factor; - } - else { - minWidth = (totalWidthPx + this.minColumnWidth * emptyCount * factor) / (1 - totalWidth / 100); - minWidth = Math.round(minWidth); - } - - return minWidth; - } - setupRowActionDefs() { this._rowActionHandlers = {};