Mercurial > hg > orthanc-stone
comparison Applications/StoneWebViewer/WebApplication/app.js @ 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 |
comparison
equal
deleted
inserted
replaced
2015:d0e68dd335dd | 2016:f30d7055ed6a |
---|---|
1337 | 1337 |
1338 if (empty) { | 1338 if (empty) { |
1339 alert('No study, nor patient was provided in the URL!'); | 1339 alert('No study, nor patient was provided in the URL!'); |
1340 } | 1340 } |
1341 } | 1341 } |
1342 | |
1343 // New in Stone Web viewer 2.5 | |
1344 var menu = getParameterFromUrl('menu'); | |
1345 if (menu !== undefined) { | |
1346 if (menu == 'hidden') { | |
1347 app.leftVisible = false; | |
1348 } else if (menu == 'small' || | |
1349 menu == 'grid' || | |
1350 menu == 'full') { | |
1351 app.leftVisible = true; | |
1352 app.leftMode = menu; | |
1353 } else { | |
1354 alert('Bad value for the "menu" option in the URL (can be "hidden", "small", "grid", or "full"): ' + menu); | |
1355 } | |
1356 } | |
1342 }); | 1357 }); |
1343 | 1358 |
1344 | 1359 |
1345 window.addEventListener('ResourcesLoaded', function() { | 1360 window.addEventListener('ResourcesLoaded', function() { |
1346 console.log('resources loaded: ', stone.GetStudiesCount(), 'studies &', stone.GetSeriesCount(), 'series'); | 1361 console.log('resources loaded: ', stone.GetStudiesCount(), 'studies &', stone.GetSeriesCount(), 'series'); |