From 0b73d554ba00a87c72524c301407ebd57f22d969 Mon Sep 17 00:00:00 2001 From: Juan Fuentes <juanf@bs-mbpr28.d.ethz.ch> Date: Tue, 10 Sep 2019 14:04:38 +0200 Subject: [PATCH] SSDM-8697 : Bugfix --- .../html/js/util/JExcelEditorManager.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/JExcelEditorManager.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/JExcelEditorManager.js index 4c1ab4c4bf8..8243e23ce83 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/JExcelEditorManager.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/JExcelEditorManager.js @@ -7,15 +7,16 @@ var JExcelEditorManager = new function() { return function(el, record, x, y, value) { var jExcelEditor = _this.jExcelEditors[guid]; if(jExcelEditor) { - // Change column width - var columnWidth = parseInt(jExcelEditor.getWidth(x)); - var td = el.children[1].children[0].children[2].children[y].children[parseInt(x)+1]; - var columnScrollWidth = td.scrollWidth; - - if(columnScrollWidth > columnWidth) { - jExcelEditor.setWidth(x, columnScrollWidth + 10); + if(value) { + // Change column width + var columnWidth = parseInt(jExcelEditor.getWidth(x)); + var td = el.children[1].children[0].children[2].children[y].children[parseInt(x)+1]; + var columnScrollWidth = td.scrollWidth; + + if(columnScrollWidth > columnWidth) { + jExcelEditor.setWidth(x, columnScrollWidth + 10); + } } - // Save Editor var data = jExcelEditor.getData(); var style = jExcelEditor.getStyle(); -- GitLab