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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 /**
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 * SPDX-FileCopyrightText: 2023 Sebastien Jodogne, UCLouvain, Belgium
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 * SPDX-License-Identifier: GPL-3.0-or-later
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 */
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 /**
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 * Kitware's VolView plugin for Orthanc
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 * Copyright (C) 2023 Sebastien Jodogne, UCLouvain, Belgium
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 *
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 * This program is free software: you can redistribute it and/or
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 * modify it under the terms of the GNU General Public License as
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 * published by the Free Software Foundation, either version 3 of the
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 * License, or (at your option) any later version.
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 *
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 * This program is distributed in the hope that it will be useful, but
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 * WITHOUT ANY WARRANTY; without even the implied warranty of
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 * General Public License for more details.
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 *
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 * You should have received a copy of the GNU General Public License
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21 * along with this program. If not, see <http://www.gnu.org/licenses/>.
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 **/
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 $('#series').live('pagebeforeshow', function() {
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 var seriesId = $.mobile.pageData.uuid;
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 $('#volview-button').remove();
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 var b = $('<a>')
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 .attr('id', 'volview-button')
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 .attr('data-role', 'button')
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 .attr('href', '#')
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 .attr('data-icon', 'search')
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 .attr('data-theme', 'e')
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 .text("Open Kitware's VolView")
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 .button();
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 b.insertAfter($('#series-info'));
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 b.click(function() {
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43 }
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 });
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 });
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 $('#study').live('pagebeforeshow', function() {
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 var studyId = $.mobile.pageData.uuid;
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51 $('#volview-button').remove();
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53 var b = $('<a>')
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54 .attr('id', 'volview-button')
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 .attr('data-role', 'button')
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56 .attr('href', '#')
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57 .attr('data-icon', 'search')
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58 .attr('data-theme', 'e')
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59 .text("Open Kitware's VolView")
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60 .button();
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62 b.insertAfter($('#study-info'));
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63 b.click(function() {
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
66 }
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
67 });
3f1cf4a8e31f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
68 });