comparison StoneWebViewer/Plugin/OrthancExplorer.js @ 1495:fb74ed5d8c22

initial commit of the Stone Web viewer
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 25 Jun 2020 16:51:10 +0200
parents
children 22d1bd085c19
comparison
equal deleted inserted replaced
1494:5a3ef478deb6 1495:fb74ed5d8c22
1 $('#study').live('pagebeforecreate', function() {
2 var b = $('<a>')
3 .attr('data-role', 'button')
4 .attr('href', '#')
5 .attr('data-icon', 'search')
6 .attr('data-theme', 'e')
7 .text('Stone Web Viewer');
8
9 b.insertBefore($('#study-delete').parent().parent());
10 b.click(function() {
11 if ($.mobile.pageData) {
12 $.ajax({
13 url: '../studies/' + $.mobile.pageData.uuid,
14 dataType: 'json',
15 cache: false,
16 success: function(study) {
17 var studyInstanceUid = study.MainDicomTags.StudyInstanceUID;
18 window.open('../stone-webviewer/index.html?study=' + studyInstanceUid);
19 }
20 });
21 }
22 });
23 });
24
25
26 $('#series').live('pagebeforecreate', function() {
27 var b = $('<a>')
28 .attr('data-role', 'button')
29 .attr('href', '#')
30 .attr('data-icon', 'search')
31 .attr('data-theme', 'e')
32 .text('Stone Web Viewer');
33
34 b.insertBefore($('#series-delete').parent().parent());
35 b.click(function() {
36 if ($.mobile.pageData) {
37 $.ajax({
38 url: '../series/' + $.mobile.pageData.uuid,
39 dataType: 'json',
40 cache: false,
41 success: function(series) {
42 $.ajax({
43 url: '../studies/' + series.ParentStudy,
44 dataType: 'json',
45 cache: false,
46 success: function(study) {
47 var studyInstanceUid = study.MainDicomTags.StudyInstanceUID;
48 var seriesInstanceUid = series.MainDicomTags.SeriesInstanceUID;
49 window.open('../stone-webviewer/index.html?study=' + studyInstanceUid +
50 '&series=' + seriesInstanceUid);
51 }
52 });
53 }
54 });
55 }
56 });
57 });