diff Applications/StoneWebViewer/WebApplication/app.js @ 1958:142c7ee8fe1f

added configuration options: ShowInfoPanelAtStartup, ShowUserPreferencesButton, and ShowNotForDiagnosticUsageDisclaimer
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 27 Oct 2022 14:53:09 +0200
parents d3ae6858e77b
children 889892e51545
line wrap: on
line diff
--- a/Applications/StoneWebViewer/WebApplication/app.js	Thu Oct 27 12:06:04 2022 +0200
+++ b/Applications/StoneWebViewer/WebApplication/app.js	Thu Oct 27 14:53:09 2022 +0200
@@ -1115,8 +1115,6 @@
     if (localStorage.settingSoftwareRendering) {
       this.settingSoftwareRendering = (localStorage.settingSoftwareRendering == '1');
     }
-    
-    this.modalNotDiagnostic = this.settingNotDiagnostic;
 
     var that = this;
     
@@ -1162,10 +1160,19 @@
     stone.SetSkipSeriesFromModalities(JSON.stringify(app.globalConfiguration.SkipSeriesFromModalities));
   }
   
+  if (app.globalConfiguration.ShowInfoPanelAtStartup == 'Always') {
+    app.modalNotDiagnostic = true;
+  } else if (app.globalConfiguration.ShowInfoPanelAtStartup == 'Never') {
+    app.modalNotDiagnostic = false;
+  } else if (app.globalConfiguration.ShowInfoPanelAtStartup == 'User') {
+    app.modalNotDiagnostic = app.settingNotDiagnostic;
+  } else {
+    alert('Bad value for option "ShowInfoPanelAtStartup": ' + app.globalConfiguration.ShowInfoPanelAtStartup);
+  }
+
   // Bearer token is new in Stone Web viewer 2.0
   var token = getParameterFromUrl('token');
-  if (token !== undefined)
-  {
+  if (token !== undefined) {
     stone.AddHttpHeader('Authorization', 'Bearer ' + token);
   }