diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/config/Profile.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/config/Profile.js index 376d581efb21345ab9c083e361180ea073ce99f3..4567e9ad34b0ed29dbd142103c1b6b58c07803fa 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/config/Profile.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/config/Profile.js @@ -160,6 +160,7 @@ $.extend(DefaultProfile.prototype, { this.allVocabularies = []; this.allDataStores = []; this.allPropertyTypes = []; + this.allDatasetTypeCodes = []; this.displaySettings = {}; this.typePropertiesForSmallTable = {}; @@ -168,6 +169,9 @@ $.extend(DefaultProfile.prototype, { "isEnabled" : false }; + this.isDatasetTypeCode = function(datasetTypeCode) { + return ($.inArray(datasetTypeCode, this.allDatasetTypeCodes) !== -1); + } this.isSampleTypeProtocol = function(sampleTypeCode) { return ($.inArray(sampleTypeCode, this.sampleTypeProtocols) !== -1); } @@ -759,18 +763,38 @@ $.extend(DefaultProfile.prototype, { }); } + this.initDatasetTypeCodes = function(callback) { + var _this = this; + this.serverFacade.listDataSetTypes(function(data) { + var dataSetTypes = data.result; + for(var i = 0; i < dataSetTypes.length; i++) { + var datasetType = dataSetTypes[i]; + _this.allDatasetTypeCodes.push(datasetType.code); + } + + _this.allDatasetTypeCodes.sort(function(a, b){ + if(a < b) return -1; + if(a > b) return 1; + return 0; + }); + + callback(); + }); + } + // // Initializes // this.init = function(callbackWhenDone) { var _this = this; - this.initPropertyTypes(function(){ _this.initVocabulariesForSampleTypes(function() { _this.initSearchDomains(function() { _this.initDirectLinkURL(function() { _this.initIsAdmin(function() { - callbackWhenDone(); + _this.initDatasetTypeCodes(function() { + callbackWhenDone(); + }); }); }); }); diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataSetForm/widgets/DatasetViewerView.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataSetForm/widgets/DatasetViewerView.js index 81fd431e98f6a71ae454f40ba4e41f79dce484e5..b35955afd5ce7934cb7e2445a9549598a98e2831 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataSetForm/widgets/DatasetViewerView.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataSetForm/widgets/DatasetViewerView.js @@ -232,7 +232,9 @@ function DataSetViewerView(dataSetViewerController, dataSetViewerModel) { return false; } var currentLevel = file.pathInDataSet.split('/').length; - if(currentLevel === 2 && file.pathInListing.toUpperCase() !== "DEFAULT") { + if(currentLevel === 2 && + file.pathInListing.toUpperCase() !== "DEFAULT" && + !profile.isDatasetTypeCode(file.pathInListing.toUpperCase())) { return false; } return currentLevel < this._level