Mercurial > hg > orthanc-stone
comparison Applications/StoneWebViewer/WebApplication/app.js @ 1697:c2802561d7f9
"PrintEnabled" configuration option
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 27 Nov 2020 09:47:46 +0100 |
parents | 572652803929 |
children | 8805a6a01655 |
comparison
equal
deleted
inserted
replaced
1696:572652803929 | 1697:c2802561d7f9 |
---|---|
28 var STUDY_DESCRIPTION = '0008,1030'; | 28 var STUDY_DESCRIPTION = '0008,1030'; |
29 var STUDY_DATE = '0008,0020'; | 29 var STUDY_DATE = '0008,0020'; |
30 | 30 |
31 // Registry of the PDF series for which the instance metadata is still waiting | 31 // Registry of the PDF series for which the instance metadata is still waiting |
32 var pendingSeriesPdf_ = {}; | 32 var pendingSeriesPdf_ = {}; |
33 | |
34 var globalConfiguration_ = {}; | |
35 | 33 |
36 | 34 |
37 function getParameterFromUrl(key) { | 35 function getParameterFromUrl(key) { |
38 var url = window.location.search.substring(1); | 36 var url = window.location.search.substring(1); |
39 var args = url.split('&'); | 37 var args = url.split('&'); |
264 mouseActionsVisible: false, | 262 mouseActionsVisible: false, |
265 activeViewport: 0, | 263 activeViewport: 0, |
266 showInfo: true, | 264 showInfo: true, |
267 showReferenceLines: true, | 265 showReferenceLines: true, |
268 synchronizedBrowsing: false, | 266 synchronizedBrowsing: false, |
267 globalConfiguration: {}, | |
269 | 268 |
270 modalWarning: false, | 269 modalWarning: false, |
271 modalNotDiagnostic: false, | 270 modalNotDiagnostic: false, |
272 modalPreferences: false, | 271 modalPreferences: false, |
273 | 272 |
836 | 835 |
837 //app.modalWarning = true; | 836 //app.modalWarning = true; |
838 | 837 |
839 axios.get(CONFIGURATION_SOURCE) | 838 axios.get(CONFIGURATION_SOURCE) |
840 .then(function(response) { | 839 .then(function(response) { |
841 globalConfiguration_ = ParseJsonWithComments(response.data); | 840 app.globalConfiguration = ParseJsonWithComments(response.data); |
842 | 841 console.log(app.globalConfiguration); |
842 | |
843 // Option 1: Loading script using plain HTML | 843 // Option 1: Loading script using plain HTML |
844 | 844 |
845 /* | 845 /* |
846 var script = document.createElement('script'); | 846 var script = document.createElement('script'); |
847 script.src = WASM_SOURCE; | 847 script.src = WASM_SOURCE; |
880 document.onselectstart = new Function ('return false'); | 880 document.onselectstart = new Function ('return false'); |
881 | 881 |
882 | 882 |
883 window.addEventListener('message', function(e) { | 883 window.addEventListener('message', function(e) { |
884 if ('type' in e.data) { | 884 if ('type' in e.data) { |
885 var expectedOrigin = globalConfiguration_['ExpectedMessageOrigin']; | 885 var expectedOrigin = app.globalConfiguration['ExpectedMessageOrigin']; |
886 | 886 |
887 if (expectedOrigin === undefined) { | 887 if (expectedOrigin === undefined) { |
888 alert('Dynamic actions are disabled in the Stone Web viewer, ' + | 888 alert('Dynamic actions are disabled in the Stone Web viewer, ' + |
889 'set the configuration option "ExpectedMessageOrigin".'); | 889 'set the configuration option "ExpectedMessageOrigin".'); |
890 } | 890 } |