Skip to content

Commit d3120ff

Browse files
authored
Merge pull request #1477 from ImagingDataCommons/idc-prod-sp
Release 47
2 parents 3cbbb11 + d2dda9c commit d3120ff

22 files changed

+1227
-599
lines changed

idc/urls.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
re_path(r'^studymp/', views.studymp, name='studymp'),
5454
re_path(r'^warning/', views.warn_page, name='warn'),
5555
re_path(r'^about/', views.about_page, name='about_page'),
56-
re_path(r'^test(.*)/', views.test_page, name='test_page'),
5756
re_path(r'^dashboard/', views.dashboard_page, name='dashboard'),
5857
re_path(r'^extended_login/$', views.extended_login_view, name='extended_login'),
5958
re_path(r'^privacy/', views.privacy_policy, name='privacy'),
@@ -62,6 +61,8 @@
6261
re_path(r'^explore/cart/$', views.cart_page, name='get_explore_cart'),
6362
re_path(r'^cart_data/$', views.cart_data, name='get_cart_data'),
6463
re_path(r'^cart_data_stats/$', views.cart_data_stats, name='get_cart_data_stats'),
64+
re_path(r'^series_ids/(?P<patient_id>[A-Za-z0-9\.\-_]+)/$', views.get_series, name='get_series_by_case'),
65+
re_path(r'^series_ids/(?P<patient_id>[A-Za-z0-9\.\-_]+)/(?P<study_uid>[0-9\.]+)/$', views.get_series, name='get_series'),
6566
re_path(r'^collaborators/', views.collaborators, name='collaborators'),
6667
re_path(r'^collections/', include('idc_collections.urls')),
6768
# re_path(r'^share/', include('sharing.urls')),

idc/views.py

Lines changed: 47 additions & 431 deletions
Large diffs are not rendered by default.

static/css/jquery-ui.min.css

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

static/css/jquery-ui.structure.min.css

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

static/css/jquery-ui.theme.min.css

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

static/css/search.css

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -395,24 +395,22 @@ tr {
395395
background-color: #b7cfe5;
396396
}
397397

398-
.export-button:hover, .btnGroupDropViewers:hover {
398+
.export-button:hover, .citations-button:hover, .btnGroupDropViewers:hover {
399399
cursor: pointer;
400400
}
401401

402402
#projects_table td.cartnumholder, #projects_table_head th.cartnumholder,
403403
#cases_table td.cartnumholder, #cases_table_head th.cartnumholder,
404-
#studies_table td.cartnumholder, #studies_table_head th.cartnumholder
405-
{
404+
#studies_table td.cartnumholder, #studies_table_head th.cartnumholder {
406405
width: 10%;
407-
408406
}
409407

410408
#projects_table td.ckbx:not(.cartnumholder), #projects_table_head th.ckbx:not(.cartnumholder),
411409
#cases_table_head th.ckbx:not(.cartnumholder), #cases_table td.ckbx:not(.cartnumholder),
412410
#studies_table_head th.ckbx:not(.cartnumholder), #studies_table td.ckbx:not(.cartnumholder),
413411
#series_table_head th.ckbx, #series_table td.ckbx {
414412
width: 5%;
415-
}
413+
}
416414

417415
#search_def_stats {
418416
padding-top: 8px; }
@@ -455,6 +453,11 @@ tr {
455453
#studies_table_head th.open-viewer,
456454
#studies_table td.open-viewer {
457455
width:4%;
456+
/* This is necessary to make sure the 2 icons remain together, lined up. */
457+
min-width: 80px;
458+
}
459+
460+
#studies_table td.open-viewer {
458461
/* This is necessary to make sure the 2 icons remain together, lined up. */
459462
min-width: 70px;
460463
}

static/css/style.css

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1786,7 +1786,7 @@ a.skip-nav {
17861786
background-color: #F8F8F8;
17871787
border-color: #76b876; }
17881788
.alert.alert-info {
1789-
color: #2d81c4;
1789+
color: #1c5c8d;
17901790
background-color: #F8F8F8;
17911791
border-color: #1976D2; }
17921792
.alert.alert-warning {
@@ -1795,6 +1795,10 @@ a.skip-nav {
17951795
.alert.alert-error {
17961796
background-color: #F8F8F8;
17971797
border-color: #D32F2F; }
1798+
.alert.alert-message {
1799+
background-color: #F8F8F8;
1800+
border-color: #47435b;
1801+
}
17981802

17991803
.alert a {
18001804
font-weight: 600;
@@ -2539,10 +2543,18 @@ section .min-max {
25392543
border-radius: 4px;
25402544
}
25412545

2546+
.modal pre {
2547+
margin-top: 10px;
2548+
}
2549+
25422550
pre.bq-string {
25432551
max-height: 600px;
25442552
width: 570px;
2545-
margin-top: 10px;
2553+
}
2554+
2555+
pre.citations-list {
2556+
white-space: pre-wrap;
2557+
word-break: break-word;
25462558
}
25472559

25482560
.bq-string-display img {
@@ -4506,11 +4518,19 @@ d-topics-list iframe {
45064518
font-size: smaller;
45074519
}
45084520

4509-
.collapse-all, .open-all {
4521+
.collapse-all, .open-all, .download-all-instances {
45104522
cursor: pointer;
45114523
}
45124524

4525+
#floating-message {
4526+
position: fixed;
4527+
bottom: 50px;
4528+
width: 500px;
4529+
right: 40px;
4530+
z-index: 9999;
4531+
}
4532+
45134533
.special-announcement {
45144534
margin-bottom: 0px;
45154535
text-align: center;
4516-
}
4536+
}

static/js/base.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,8 @@ require([
214214
sessionStorage.removeItem("user-manifest");
215215
});
216216

217+
$('#floating-message').draggable();
218+
217219
$(document).ready(function(){
218220
if(sessionStorage.getItem("reloadMsg")) {
219221
var msg = JSON.parse(sessionStorage.getItem("reloadMsg"));
@@ -261,6 +263,7 @@ define(['jquery', 'utils'], function($, utils) {
261263
// From http://www.regular-expressions.info/email.html
262264
email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/,
263265
showJsMessage: utils.showJsMessage,
266+
hideFloatingMessage: utils.hideFloatingMessage,
264267
// Simple method for standardizing storage of a message into sessionStorage so it can be retrieved and reloaded
265268
// at document load time
266269
setReloadMsg: function(type,text) {

static/js/citations_modal.js

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
/**
2+
*
3+
* Copyright 2020-2025, Institute for Systems Biology
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*
17+
*/
18+
19+
require.config({
20+
baseUrl: STATIC_FILES_URL + 'js/',
21+
paths: {
22+
jquery: 'libs/jquery-3.7.1.min',
23+
bootstrap: 'libs/bootstrap.min',
24+
jqueryui: 'libs/jquery-ui.min',
25+
underscore: 'libs/underscore-min',
26+
tablesorter: 'libs/jquery.tablesorter.min',
27+
assetscore: 'libs/assets.core',
28+
assetsresponsive: 'libs/assets.responsive',
29+
jquerydt: 'libs/jquery.dataTables.min',
30+
base: 'base',
31+
tippy: 'libs/tippy-bundle.umd.min',
32+
'@popperjs/core': 'libs/popper.min',
33+
session_security: 'session_security/script'
34+
35+
},
36+
shim: {
37+
'@popperjs/core': {
38+
exports: "@popperjs/core"
39+
},
40+
'tippy': {
41+
exports: 'tippy',
42+
deps: ['@popperjs/core']
43+
},
44+
'bootstrap': ['jquery'],
45+
'jqueryui': ['jquery'],
46+
'jquerydt': ['jquery'],
47+
'underscore': {exports: '_'},
48+
'tablesorter': ['jquery'],
49+
'assetscore': ['jquery', 'bootstrap', 'jqueryui'],
50+
'session_security': ['jquery'],
51+
'assetsresponsive': ['jquery', 'bootstrap', 'jqueryui']
52+
}
53+
});
54+
55+
require([
56+
'jquery',
57+
'jqueryui',
58+
'tippy',
59+
'base', // Do not remove
60+
'bootstrap',
61+
'assetscore',
62+
'assetsresponsive',
63+
], function($, jqueryui, tippy, base) {
64+
65+
var DOI_CACHE = {};
66+
67+
A11y.Core();
68+
69+
var downloadToken = new Date().getTime();
70+
71+
$('#citations-modal').on('show.bs.modal', async function(event) {
72+
let button = $(event.relatedTarget);
73+
let dois = button.attr('data-dois').split("||");
74+
let cites_list = $("#citations-modal .citations-list");
75+
let copy_cites = $("#citations-modal .copy-this");
76+
cites_list.html(`
77+
Formatting citation(s)... <i class="fa fa-compass fa-spin"></i>
78+
`);
79+
let citations = [];
80+
await Promise.all(dois.map(async function(cite){
81+
if(!DOI_CACHE[cite]) {
82+
let response = await fetch(`https://doi.org/${cite}`, {
83+
headers: {
84+
"Accept": "text/x-bibliography; style=elsevier-vancouver-no-et-al"
85+
}
86+
});
87+
if (!response.ok) {
88+
citations.push(`Encountered an error requesting DOI ${cite}`);
89+
} else {
90+
DOI_CACHE[cite] = await response.text();
91+
}
92+
}
93+
citations.push(DOI_CACHE[cite]);
94+
}));
95+
cites_list.html(citations.join("\n\n"));
96+
copy_cites.attr('content', citations.join("\n\n"));
97+
});
98+
99+
$('#citations-modal').on('hide.bs.modal', function() {
100+
101+
});
102+
103+
$('#export-manifest-modal').on('hidden.bs.modal', function() {
104+
$(".citations-list").empty();
105+
});
106+
107+
$('.copy-this').on('click', function(e) {
108+
// copy the entire set
109+
});
110+
111+
tippy.delegate('#citations-modal', {
112+
content: 'Copied!',
113+
theme: 'blue',
114+
placement: 'right',
115+
arrow: true,
116+
interactive: true, // This is required for any table tooltip to show at the appropriate spot!
117+
target: '.copy-this',
118+
onShow(instance) {
119+
setTimeout(function() {
120+
instance.hide();
121+
}, 1000);
122+
},
123+
trigger: "click",
124+
maxWidth: 85
125+
});
126+
});

static/js/cohorts/export-manifest.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,8 +394,8 @@ require([
394394
file_name.attr("name-base", "cohort_" + cohort_ids.join("_") + export_manifest_modal.data('file-timestamp'));
395395
}
396396
}
397-
let s5cmd_manifest_filename = "<filename>";
398-
let idc_index_manifest_filename = "<filename>";
397+
let s5cmd_manifest_filename = "<manifest filename>";
398+
let idc_index_manifest_filename = "<manifest filename>";
399399
let s5cmd_endpoint_url = $('input[name="loc_type_s5cmd"]:checked').attr('data-endpoint-url');
400400

401401
let s5cmd_text = `s5cmd --no-sign-request --endpoint-url ${s5cmd_endpoint_url} run ${s5cmd_manifest_filename}`;

0 commit comments

Comments
 (0)