Mercurial > hg > orthanc-volview
annotate Sources/OrthancExplorer.js @ 13:7f77ea98e42c
sync
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 22 Nov 2023 08:01:42 +0100 |
parents | 59117a506f9f |
children | ec47d2182ac6 |
rev | line source |
---|---|
0 | 1 /** |
2 * SPDX-FileCopyrightText: 2023 Sebastien Jodogne, UCLouvain, Belgium | |
3 * SPDX-License-Identifier: GPL-3.0-or-later | |
4 */ | |
5 | |
6 /** | |
7 * Kitware's VolView plugin for Orthanc | |
8 * Copyright (C) 2023 Sebastien Jodogne, UCLouvain, Belgium | |
9 * | |
10 * This program is free software: you can redistribute it and/or | |
11 * modify it under the terms of the GNU General Public License as | |
12 * published by the Free Software Foundation, either version 3 of the | |
13 * License, or (at your option) any later version. | |
14 * | |
15 * This program is distributed in the hope that it will be useful, but | |
16 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
18 * General Public License for more details. | |
19 * | |
20 * You should have received a copy of the GNU General Public License | |
21 * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
22 **/ | |
23 | |
24 | |
25 $('#series').live('pagebeforeshow', function() { | |
26 var seriesId = $.mobile.pageData.uuid; | |
27 | |
28 $('#volview-button').remove(); | |
29 | |
30 var b = $('<a>') | |
31 .attr('id', 'volview-button') | |
32 .attr('data-role', 'button') | |
33 .attr('href', '#') | |
34 .attr('data-icon', 'search') | |
35 .attr('data-theme', 'e') | |
36 .text("Open Kitware's VolView") | |
37 .button(); | |
38 | |
39 b.insertAfter($('#series-info')); | |
40 b.click(function() { | |
41 if ($.mobile.pageData) { | |
7
59117a506f9f
Upgrade to VolView 4.1.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
0
diff
changeset
|
42 window.open('../volview/index.html?names=[archive.zip]&urls=[../series/' + seriesId + '/archive]'); |
0 | 43 } |
44 }); | |
45 }); | |
46 | |
47 | |
48 $('#study').live('pagebeforeshow', function() { | |
49 var studyId = $.mobile.pageData.uuid; | |
50 | |
51 $('#volview-button').remove(); | |
52 | |
53 var b = $('<a>') | |
54 .attr('id', 'volview-button') | |
55 .attr('data-role', 'button') | |
56 .attr('href', '#') | |
57 .attr('data-icon', 'search') | |
58 .attr('data-theme', 'e') | |
59 .text("Open Kitware's VolView") | |
60 .button(); | |
61 | |
62 b.insertAfter($('#study-info')); | |
63 b.click(function() { | |
64 if ($.mobile.pageData) { | |
7
59117a506f9f
Upgrade to VolView 4.1.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
0
diff
changeset
|
65 window.open('../volview/index.html?names=[archive.zip]&urls=[../studies/' + studyId + '/archive]'); |
0 | 66 } |
67 }); | |
68 }); |