changeset 2016:f30d7055ed6a

new URL argument "menu" to change the layout of the list of studies/series
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sat, 03 Dec 2022 08:12:14 +0100
parents d0e68dd335dd
children 7e45941acc1d
files Applications/StoneWebViewer/NEWS Applications/StoneWebViewer/NOTES.txt Applications/StoneWebViewer/WebApplication/app.js
diffstat 3 files changed, 26 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/Applications/StoneWebViewer/NEWS	Sat Dec 03 07:59:13 2022 +0100
+++ b/Applications/StoneWebViewer/NEWS	Sat Dec 03 08:12:14 2022 +0100
@@ -2,6 +2,7 @@
 ===============================
 
 * Click-drag is available on the vertical slider
+* New URL argument "menu" to change the layout of the list of studies/series
 * Annotations are grouped into one submenu for narrow screens
 * Fix measurement of arcs
 * Width of the vertical slider has doubled to ease user interactions
--- a/Applications/StoneWebViewer/NOTES.txt	Sat Dec 03 07:59:13 2022 +0100
+++ b/Applications/StoneWebViewer/NOTES.txt	Sat Dec 03 08:12:14 2022 +0100
@@ -124,6 +124,16 @@
 "Authorization: Bearer Hello"
 
 
+Additional options
+==================
+
+- If present in the URL, the "menu" argument can be used to set the
+  default layout of the left-hand list of studies/series. Its allowed
+  values are "hidden", "small", "grid" (default value at the study
+  level), or "full" (default value at the series level). (new in Stone
+  Web viewer 2.5)
+
+
 Dynamic actions using messages
 ==============================
 
--- a/Applications/StoneWebViewer/WebApplication/app.js	Sat Dec 03 07:59:13 2022 +0100
+++ b/Applications/StoneWebViewer/WebApplication/app.js	Sat Dec 03 08:12:14 2022 +0100
@@ -1339,6 +1339,21 @@
       alert('No study, nor patient was provided in the URL!');
     }
   }
+
+  // New in Stone Web viewer 2.5
+  var menu = getParameterFromUrl('menu');
+  if (menu !== undefined) {
+    if (menu == 'hidden') {
+      app.leftVisible = false;
+    } else if (menu == 'small' ||
+               menu == 'grid' ||
+               menu == 'full') {
+      app.leftVisible = true;
+      app.leftMode = menu;
+    } else {
+      alert('Bad value for the "menu" option in the URL (can be "hidden", "small", "grid", or "full"): ' + menu);
+    }
+  }
 });