From 263dcf9fb676ab969a31891601cd872db1003ef7 Mon Sep 17 00:00:00 2001 From: vkovtun <vkovtun@ethz.ch> Date: Wed, 7 Jun 2023 15:03:27 +0200 Subject: [PATCH] SSDM-13693: Made size columns consistent in the advance search and archiving views. --- .../html/js/views/AdvancedSearch/AdvancedSearchView.js | 10 +++++++++- .../js/views/ArchivingHelper/ArchivingHelperView.js | 9 --------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/AdvancedSearch/AdvancedSearchView.js b/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/AdvancedSearch/AdvancedSearchView.js index e903479c2fb..cee65ded8e4 100644 --- a/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/AdvancedSearch/AdvancedSearchView.js +++ b/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/AdvancedSearch/AdvancedSearchView.js @@ -1114,12 +1114,20 @@ function AdvancedSearchView(advancedSearchController, advancedSearchModel) { columns.push({ label : "Size (bytes)", property : "size", - isExportable : false, + exportableProperty: DataGridExportOptions.EXPORTABLE_FIELD.SIZE, sortable : false, render : function(data, grid) { return data.size; } }); + columns.push({ + label : "Size", + property : "sizeHumanReadable", + sortable : false, + render : function(data, grid) { + return PrintUtil.renderNumberOfBytes(data.size); + } + }); } columns = columns.concat(_this.additionalColumns); diff --git a/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/ArchivingHelper/ArchivingHelperView.js b/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/ArchivingHelper/ArchivingHelperView.js index 7cc6d166544..bf666d86389 100644 --- a/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/ArchivingHelper/ArchivingHelperView.js +++ b/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/ArchivingHelper/ArchivingHelperView.js @@ -76,15 +76,6 @@ function ArchivingHelperView(archivingHelperController, archivingHelperModel) { exportableProperty: DataGridExportOptions.EXPORTABLE_FIELD.SAMPLE, sortable : false }]; - searchView.additionalLastColumns = [{ - label : "Size", - property : "size", - exportableProperty: DataGridExportOptions.EXPORTABLE_FIELD.SIZE, - sortable : false, - render : function(data, grid) { - return PrintUtil.renderNumberOfBytes(data.size); - } - }]; searchView._paintRulesPanel($rulesPanel); searchView._$entityTypeDropdown.val("DATASET"); searchView._$entityTypeDropdown.trigger("change"); -- GitLab