From 20a7886dfe91d46923ac8653d84e6f8d908ecd72 Mon Sep 17 00:00:00 2001 From: Viktor Kovtun <viktor.kovtun@id.ethz.ch> Date: Thu, 28 Nov 2019 09:24:38 +0100 Subject: [PATCH] SSDM-8999 Added configuration whether to show RC integration to config.js. --- .../1/as/webapps/eln-lims/html/etc/config.js | 30 +++++++++++-------- .../eln-lims/html/js/config/Profile.js | 1 - .../js/views/SideMenu/SideMenuWidgetView.js | 4 +-- 3 files changed, 19 insertions(+), 16 deletions(-) diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/etc/config.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/etc/config.js index d9bf2469a0f..589cda418e5 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/etc/config.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/etc/config.js @@ -1,16 +1,16 @@ var loadJSResorce = function(pathToResource, onLoad) { - var head = document.getElementsByTagName('head')[0]; - var script= document.createElement('script'); - script.type= 'text/javascript'; - var src = pathToResource; - script.src= src; - script.onreadystatechange= function () { - if (this.readyState == 'complete') onLoad(); - } - script.onload = onLoad; + var head = document.getElementsByTagName('head')[0]; + var script= document.createElement('script'); + script.type= 'text/javascript'; + var src = pathToResource; + script.src= src; + script.onreadystatechange= function () { + if (this.readyState === 'complete') onLoad(); + }; + script.onload = onLoad; - head.appendChild(script); -} + head.appendChild(script); +}; var onLoadInstanceProfileResorceFunc = function() { profile = new InstanceProfile(); @@ -23,7 +23,7 @@ var onLoadInstanceProfileResorceFunc = function() { $("#mainLogoTitle").css("font-weight", "bold"); } $("login-form-div").attr("visibility", "visible"); -} +}; //<PROFILE_PLACEHOLDER> loadJSResorce("./etc/InstanceProfile.js", onLoadInstanceProfileResorceFunc); @@ -31,4 +31,8 @@ loadJSResorce("./etc/InstanceProfile.js", onLoadInstanceProfileResorceFunc); var PLUGINS_CONFIGURATION = { extraPlugins : ["life-sciences", "flow", "microscopy"] -} \ No newline at end of file +}; + +var options = { + showResearchCollectionExportBuilder: false +}; \ No newline at end of file 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 1d08a2ea8c0..1532d897dc2 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 @@ -62,7 +62,6 @@ $.extend(DefaultProfile.prototype, { showVocabularyViewer : true, showUserManager : true, showUserProfile : true, - showResearchCollectionExportBuilder : false, showZenodoExportBuilder : false, showBarcodes : false, } diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SideMenu/SideMenuWidgetView.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SideMenu/SideMenuWidgetView.js index af52a187c99..15f676c09a9 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SideMenu/SideMenuWidgetView.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SideMenu/SideMenuWidgetView.js @@ -279,7 +279,7 @@ function SideMenuWidgetView(sideMenuWidgetController, sideMenuWidgetModel) { treeModelUtils.push({ displayName: "Unarchiving Helper", title : unarchivingHelperLink, entityType: "UNARCHIVING_HELPER", key : "UNARCHIVING_HELPER", folder : false, lazy : false, view : "showUnarchivingHelperPage", icon : "glyphicon glyphicon-open" }); } - if (profile.mainMenu.showExports || profile.mainMenu.showResearchCollectionExportBuilder || profile.mainMenu.showZenodoExportBuilder) { + if (profile.mainMenu.showExports || options.showResearchCollectionExportBuilder || profile.mainMenu.showZenodoExportBuilder) { var treeModelExports = []; if (profile.mainMenu.showExports) { @@ -290,7 +290,7 @@ function SideMenuWidgetView(sideMenuWidgetController, sideMenuWidgetModel) { }); } - if (profile.mainMenu.showResearchCollectionExportBuilder) { + if (options.showResearchCollectionExportBuilder) { var researchCollectionExportBuilderLink = _this.getLinkForNode("Export to Research Collection", "EXPORT_TO_RESEARCH_COLLECTION", "showResearchCollectionExportPage", null, null); treeModelExports.push({ -- GitLab