From ef468865a4beb938b7295c489bbc5a3bac4886e2 Mon Sep 17 00:00:00 2001 From: Yves Noirjean <yves.noirjean@id.ethz.ch> Date: Fri, 25 May 2018 10:35:14 +0200 Subject: [PATCH] SSDM-5544: not showing preview icon for files which start with . --- .../html/js/views/DataSetForm/widgets/DatasetViewerModel.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataSetForm/widgets/DatasetViewerModel.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataSetForm/widgets/DatasetViewerModel.js index 2395ca44039..c42346b5d68 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataSetForm/widgets/DatasetViewerModel.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataSetForm/widgets/DatasetViewerModel.js @@ -83,9 +83,10 @@ function DataSetViewerModel(containerId, profile, entity, serverFacade, datastor } this._isIconableImage = function(pathInDataSet) { - return this._hasExtension(pathInDataSet, ["jpg", "jpeg", "png", "gif"]); + var filename = pathInDataSet.split('/').slice(-1)[0]; + return !filename.startsWith('.') && this._hasExtension(pathInDataSet, ["jpg", "jpeg", "png", "gif"]); } - + this._isJupyterNotebook = function(pathInDataSet) { return this._hasExtension(pathInDataSet, ["ipynb"]); } -- GitLab