Skip to content

Commit 34a0644

Browse files
committed
-> #1509
1 parent 2f7b73f commit 34a0644

4 files changed

Lines changed: 98 additions & 101 deletions

File tree

static/css/search.css

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -418,13 +418,14 @@ tr {
418418
#studies_table_head th.ckbx:not(.cartnumholder), #studies_table td.ckbx:not(.cartnumholder),
419419
#series_table_head th.ckbx, #series_table td.ckbx {
420420
width: 5%;
421+
text-align: left !important;
421422
}
422423

423424
#search_def_stats {
424425
padding-top: 8px; }
425426

426427
#projects_table td, #projects_table_head th {
427-
width: 30%;
428+
width: 40%;
428429
word-wrap: break-word; }
429430

430431
#cases_table td, #cases_table_head th {
@@ -481,9 +482,9 @@ tr {
481482
#studies_table_head th.download-col,
482483
#studies_table td.download-col, #cases_table_head th.download-col,
483484
#cases_table td.download-col, #series_table_head th.download-col,
484-
#series_table td.download-col {
485+
#series_table td.download-col, #proj_table th.download-col, #proj_table td.download-col {
485486
width:6%;
486-
min-width: 80px;
487+
min-width: 60px;
487488
}
488489

489490
#series_table_head th, #series_table td {

static/js/explore.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,7 @@ require([
455455
interactive: true,
456456
allowHTML: true,
457457
placement: 'right',
458+
theme: 'dark',
458459
content: 'add series to cart', // placeholder text
459460
target: '.shopping-cart-holder',
460461
plugins: [dynamicTipFunc]

static/js/tables.js

Lines changed: 82 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,6 @@ define(['cartutils','filterutils','tippy','jquery', 'base'], function(cartutils,
213213
return cmp;
214214
}
215215

216-
217216
var dir = request.order[0]['dir'];
218217
var colId = parseInt(request.order[0]['column']);
219218
var col = cache.colOrder[colId];
@@ -237,13 +236,14 @@ define(['cartutils','filterutils','tippy','jquery', 'base'], function(cartutils,
237236

238237
// classes for project(collection) table columns
239238
var projectTableColDefs = function(){
240-
return [{className: "ckbx text_data viewbx caseview", "targets": [0]},
241-
{className: "ckbx shopping-cart-holder", "targets": [1]},
242-
{className: "ckbx cartnumholder", "targets": [2]},
243-
{className: "collex_name", "targets": [3]},
244-
{className: "collex-case-count table-count", "targets": [4]},
245-
{className: "projects_table_num_cohort table-count", "targets": [5]},
246-
{className: "download-collection download-col", "targets": [6]}];
239+
return [
240+
{className: "ckbx text_data viewbx caseview", "targets": [0]},
241+
{className: "download-collection download-col", "targets": [1]},
242+
{className: "ckbx shopping-cart-holder", "targets": [2]},
243+
{className: "ckbx cartnumholder", "targets": [3]},
244+
{className: "collex_name", "targets": [4]},
245+
{className: "collex-case-count projects_table_num_cohort table-count", "targets": [5]}
246+
];
247247
}
248248

249249
// project(collection) table column definitions
@@ -282,15 +282,11 @@ define(['cartutils','filterutils','tippy','jquery', 'base'], function(cartutils,
282282
' <a class="copy-this" role="button" content="' + row[0] +
283283
'" title="Copy the IDC collection_id to the clipboard"><i class="fa-solid fa-copy"></i></a>'
284284
}};
285-
var case_col = { "type": "num", orderable: true };
286-
var dyn_case_col = {
287-
"type": "num",
288-
orderable: true,
289-
"createdCell": function (td, data, row) {
285+
var case_col = { "type": "num", orderable: true, "createdCell": function (td, data, row) {
290286
$(td).attr('id', 'patient_col_' + row[0]);
291-
return;
292-
}
293-
};
287+
}, render: function(td, data,row) {
288+
return `${row[4]} / ${row[5]}`;
289+
}};
294290
const download_col = {"type": "html", "orderable": false, data: 'collection_id', render: function(data, type, row) {
295291
let download_size = window.collection[row[0]]['total_size_with_ar'];
296292
if ("showDirectoryPicker" in window && download_size < 3) {
@@ -312,7 +308,7 @@ define(['cartutils','filterutils','tippy','jquery', 'base'], function(cartutils,
312308
}
313309
}};
314310

315-
return [caret_col, cart_col, cartnum_col, collection_col, case_col, dyn_case_col, download_col];
311+
return [caret_col, download_col, cart_col, cartnum_col, collection_col, case_col];
316312
}
317313

318314
const setRowCartClasses = function(row){
@@ -399,7 +395,7 @@ define(['cartutils','filterutils','tippy','jquery', 'base'], function(cartutils,
399395
$("#proj_table_wrapper").find('.dataTables_controls').remove();
400396
var colDefs = projectTableColDefs();
401397
var columns = projectTableColumns();
402-
var ord = [[3, "asc"]]
398+
var ord = [[4, "asc"]]
403399

404400
$('#proj_table').DataTable(
405401
{
@@ -495,13 +491,14 @@ define(['cartutils','filterutils','tippy','jquery', 'base'], function(cartutils,
495491
const caseTableColDefs = function(){
496492
return [
497493
{className: "ckbx studyview","targets": [0]},
498-
{className: "ckbx shopping-cart-holder", "targets": [1]},
499-
{className: "ckbx cartnumholder", "targets":[2]},
500-
{className: "col1 project-name wide", "targets": [3]},
501-
{className: "col1 case-id", "targets": [4]},
502-
{className: "col1 numrows narrow", "targets": [5]},
503-
{className: "col1 numseries narrow", "targets": [6]},
504-
{className: "col1 download-case download-col", "targets": [7]}];
494+
{className: "col1 download-case download-col", "targets": [1]},
495+
{className: "ckbx shopping-cart-holder", "targets": [2]},
496+
{className: "ckbx cartnumholder", "targets":[3]},
497+
{className: "col1 project-name wide", "targets": [4]},
498+
{className: "col1 case-id", "targets": [5]},
499+
{className: "col1 numrows narrow", "targets": [6]},
500+
{className: "col1 numseries narrow", "targets": [7]}
501+
];
505502
};
506503

507504
const caseTableColumns = function() {
@@ -570,7 +567,7 @@ define(['cartutils','filterutils','tippy','jquery', 'base'], function(cartutils,
570567
}
571568
return `<i class="fa fa-download download-instances is-disabled" data-disabled-type="download-all-disabled"></i>`;
572569
}};
573-
return [caret_col, cart_col, cartnum_col, collection_col, case_col, study_col, series_col, download_col];
570+
return [caret_col, download_col, cart_col, cartnum_col, collection_col, case_col, study_col, series_col];
574571
};
575572

576573
// recreates the cases table when a chevron is clicked in the projects table. Defines the chevron and cart selection actions.
@@ -865,16 +862,16 @@ define(['cartutils','filterutils','tippy','jquery', 'base'], function(cartutils,
865862
},
866863
"columnDefs": [
867864
{className: "ckbx seriesview", "targets": [0]},
868-
{className: "ckbx shopping-cart-holder", "targets": [1]},
869-
{className: "ckbx cartnumholder", "targets": [2]},
870-
{className: "col1 case-id", "targets": [3]},
871-
{className: "col2 study-id study-id-col study-id-tltp", "targets": [4]},
872-
{className: "col1 study-date", "targets": [5]},
873-
{className: "col1 study-description", "targets": [6]},
874-
{className: "col1 numrows", "targets": [7]},
875-
{className: "ohif open-viewer", "targets": [8]},
876-
{className: "manifest-col", "targets": [9]},
877-
{className: "download-col download-study", "targets": [10]},
865+
{className: "download-col download-study", "targets": [1]},
866+
{className: "ckbx shopping-cart-holder", "targets": [2]},
867+
{className: "ckbx cartnumholder", "targets": [3]},
868+
{className: "col1 case-id", "targets": [4]},
869+
{className: "col2 study-id study-id-col study-id-tltp", "targets": [5]},
870+
{className: "col1 study-date", "targets": [6]},
871+
{className: "col1 study-description", "targets": [7]},
872+
{className: "col1 numrows", "targets": [8]},
873+
{className: "ohif open-viewer", "targets": [9]},
874+
{className: "manifest-col", "targets": [10]}
878875
],
879876
"columns": [
880877
{
@@ -904,8 +901,22 @@ define(['cartutils','filterutils','tippy','jquery', 'base'], function(cartutils,
904901
$(td).addClass('open');
905902
}
906903
}
907-
},
908-
{
904+
},{
905+
"type":"html",
906+
"orderable": false,
907+
data: 'StudyInstanceUID', render: function (data, type, row) {
908+
if ("showDirectoryPicker" in window) {
909+
return `<i class="fa fa-download download-all-instances download-instances download-study"
910+
data-collection="${row['collection_id']}"
911+
data-study="${row['StudyInstanceUID']}"
912+
data-patient="${row['PatientID']}"
913+
data-download-type="study"
914+
data-total-series="${row['unique_series']}"
915+
></i>`;
916+
}
917+
return `<i class="fa fa-download download-instances is-disabled" data-disabled-type="download-all-disabled"></i>`;
918+
}
919+
},{
909920
"type": "html",
910921
"orderable": false,
911922
render: function () {
@@ -992,7 +1003,7 @@ define(['cartutils','filterutils','tippy','jquery', 'base'], function(cartutils,
9921003
}
9931004
return '<a href="' + default_viewer + '" target="_blank" rel="noopener noreferrer"><i class="fa-solid fa-eye"></i>' +
9941005
'<div class="dropdown viewer-toggle">' +
995-
'<a class="dropdown-toggle btnGroupDropViewers" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true"><i class="fa-solid fa-folder-open"></i></a>' +
1006+
'<a class="dropdown-toggle btnGroupDropViewers" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true"><i class="fa-solid fa-caret-down"></i></a>' +
9961007
'<ul class="dropdown-menu viewer-menu">' +
9971008
'<li><a href="'+v3_link+'" target="_blank" rel="noopener noreferrer">OHIF v3</a></li>' +
9981009
v2_element +
@@ -1009,23 +1020,7 @@ define(['cartutils','filterutils','tippy','jquery', 'base'], function(cartutils,
10091020
return '<i class="fa fa-list study-export export-button" data-series-count="'+row['unique_series']
10101021
+'" data-uid="'+data+'"data-toggle="modal" data-target="#export-manifest-modal"></i>'
10111022
}
1012-
},
1013-
{
1014-
"type":"html",
1015-
"orderable": false,
1016-
data: 'StudyInstanceUID', render: function (data, type, row) {
1017-
if ("showDirectoryPicker" in window) {
1018-
return `<i class="fa fa-download download-all-instances download-instances download-study"
1019-
data-collection="${row['collection_id']}"
1020-
data-study="${row['StudyInstanceUID']}"
1021-
data-patient="${row['PatientID']}"
1022-
data-download-type="study"
1023-
data-total-series="${row['unique_series']}"
1024-
></i>`;
1025-
}
1026-
return `<i class="fa fa-download download-instances is-disabled" data-disabled-type="download-all-disabled"></i>`;
1027-
}
1028-
}
1023+
}
10291024
],
10301025
"processing": true,
10311026
"serverSide": true,
@@ -1251,22 +1246,40 @@ define(['cartutils','filterutils','tippy','jquery', 'base'], function(cartutils,
12511246
});
12521247
},
12531248
"columnDefs": [
1254-
{className: "ckbx shopping-cart-holder", "targets": [0]},
1255-
{className: "col1 study-id study-id-col study-id-tltp", "targets": [1]},
1256-
{className: "series-id series-id-tltp", "targets": [2]},
1257-
{className: "series-number", "targets": [3]},
1258-
{className: "col1 modality", "targets": [4]},
1259-
{className: "col1 body-part-examined", "targets": [5]},
1260-
{className: "series-description", "targets": [6]},
1261-
{className: "ohif open-viewer", "targets": [7]},
1262-
{className: "manifest-col", "targets": [8]},
1263-
{className: "download-col download-series", "targets": [9]}
1249+
{className: "download-col download-series", "targets": [0]},
1250+
{className: "ckbx shopping-cart-holder", "targets": [1]},
1251+
{className: "col1 study-id study-id-col study-id-tltp", "targets": [2]},
1252+
{className: "series-id series-id-tltp", "targets": [3]},
1253+
{className: "series-number", "targets": [4]},
1254+
{className: "col1 modality", "targets": [5]},
1255+
{className: "col1 body-part-examined", "targets": [6]},
1256+
{className: "series-description", "targets": [7]},
1257+
{className: "ohif open-viewer", "targets": [8]},
1258+
{className: "manifest-col", "targets": [9]},
12641259
],
12651260
"columns": [
1266-
{"type": "html", "orderable": false, render: function () {
1261+
{
1262+
"type":"html",
1263+
"orderable": false,
1264+
data: 'SeriesInstanceUID', render: function (data, type, row){
1265+
if("showDirectoryPicker" in window) {
1266+
return `<i class="fa fa-download download-all-instances download-instances" data-bucket="${row['aws_bucket']}"
1267+
data-series="${row['crdc_series_uuid']}"
1268+
data-series-id="${row['SeriesInstanceUID']}"
1269+
data-modality="${row['Modality']}"
1270+
data-collection="${row['collection_id']}"
1271+
data-study="${row['StudyInstanceUID']}"
1272+
data-patient="${row['PatientID']}"
1273+
data-series-size="${row['instance_size']}"
1274+
></i>`
1275+
}
1276+
return `<i class="fa fa-download is-disabled download-instances" data-disabled-type="download-all-disabled"></i>`
1277+
}
1278+
}, {
1279+
"type": "html", "orderable": false, render: function () {
12671280
return '<i class="fa-solid fa-cart-shopping shopping-cart"></i>'
12681281
}
1269-
}, {
1282+
}, {
12701283
"type": "text", "orderable": true, data: 'StudyInstanceUID', render: function (data) {
12711284
return pretty_print_id(data) +
12721285
' <a class="copy-this" role="button" content="' + data +
@@ -1351,7 +1364,7 @@ define(['cartutils','filterutils','tippy','jquery', 'base'], function(cartutils,
13511364

13521365
return '<a href="' + default_viewer + '" target="_blank" rel="noopener noreferrer"><i class="fa-solid fa-eye"></i>' +
13531366
'<div class="dropdown viewer-toggle">' +
1354-
'<a class="dropdown-toggle btnGroupDropViewers" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true"><i class="fa-solid fa-folder-open"></i></a>' +
1367+
'<a class="dropdown-toggle btnGroupDropViewers" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true"><i class="fa-solid fa-caret-down"></i></a>' +
13551368
'<ul class="dropdown-menu viewer-menu">' +
13561369
'<li><a href="'+v3_link+'" target="_blank" rel="noopener noreferrer">OHIF v3</a></li>' +
13571370
v2_element +
@@ -1365,23 +1378,6 @@ define(['cartutils','filterutils','tippy','jquery', 'base'], function(cartutils,
13651378
data: 'SeriesInstanceUID', render: function (data){
13661379
return '<i class="fa fa-list series-export export-button" data-uid="'+data+'"data-toggle="modal" data-target="#export-manifest-modal"></i>'
13671380
}
1368-
}, {
1369-
"type":"html",
1370-
"orderable": false,
1371-
data: 'SeriesInstanceUID', render: function (data, type, row){
1372-
if("showDirectoryPicker" in window) {
1373-
return `<i class="fa fa-download download-all-instances download-instances" data-bucket="${row['aws_bucket']}"
1374-
data-series="${row['crdc_series_uuid']}"
1375-
data-series-id="${row['SeriesInstanceUID']}"
1376-
data-modality="${row['Modality']}"
1377-
data-collection="${row['collection_id']}"
1378-
data-study="${row['StudyInstanceUID']}"
1379-
data-patient="${row['PatientID']}"
1380-
data-series-size="${row['instance_size']}"
1381-
></i>`
1382-
}
1383-
return `<i class="fa fa-download is-disabled download-instances" data-disabled-type="download-all-disabled"></i>`
1384-
}
13851381
}
13861382
],
13871383
"processing": true,

0 commit comments

Comments
 (0)