# HG changeset patch # User Sebastien Jodogne # Date 1670051534 -3600 # Node ID f30d7055ed6af859fa6bfbbcf5e47fb78951f76b # Parent d0e68dd335ddffbe0091639c38f9b53fda1f4036 new URL argument "menu" to change the layout of the list of studies/series diff -r d0e68dd335dd -r f30d7055ed6a Applications/StoneWebViewer/NEWS --- 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 diff -r d0e68dd335dd -r f30d7055ed6a Applications/StoneWebViewer/NOTES.txt --- 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 ============================== diff -r d0e68dd335dd -r f30d7055ed6a Applications/StoneWebViewer/WebApplication/app.js --- 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); + } + } });