Skip to content

Commit 9cf92cd

Browse files
authored
Merge pull request #472 from ImagingDataCommons/user/mt/multi-part-manifest
disabled the files option if file parts are greater than 10
2 parents e1b0ec5 + 43b3d63 commit 9cf92cd

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

static/js/image_search.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1764,18 +1764,17 @@ require([
17641764
}));
17651765
}
17661766

1767-
var file_limit_message = $('#file-part-limit-reached-message');
17681767
if (data.display_file_parts_count < data.file_parts_count)
17691768
{
1770-
file_limit_message.show();
1771-
file_limit_message.html(
1772-
'<span>* This cohort\'s manifest has reached the limit of ' +
1773-
data.display_file_parts_count + ' file parts.' +
1774-
' Please use the BigQuery option to access all ' + data.file_parts_count + ' parts.</span>');
1769+
$('#file-export-option').prop('title', 'Export to files is only available for smaller manifest');
1770+
$('#file-export-option input').prop('disabled', 'disabled');
1771+
$('#file-export-option input').prop('checked', false);
1772+
$('#bq-export-option input').prop('checked', true).trigger("click");
17751773
}
17761774
else
17771775
{
1778-
file_limit_message.hide();
1776+
$('#file-export-option').prop('title', '');
1777+
$('#file-export-option input').prop('disabled', '');
17791778
}
17801779
}
17811780
else

templates/cohorts/export-manifest-modal.html

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ <h4 class="modal-title" id="exportManifestModal">Export Cohort Manifest</h4>
116116

117117
<!-- Export Option -->
118118
<div class="export-option">
119-
<span class="value"><input type="radio" name="manifest-type" value="file-manifest" checked> Files</span>
120-
<span style="margin-left:10px" class="value" {% if not is_social %}title="Export to BigQuery is only available with a Google Account."{% endif %}>
119+
<span id="file-export-option" title="" class="value"><input type="radio" name="manifest-type" value="file-manifest" checked> Files</span>
120+
<span id="bq-export-option" style="margin-left:10px" class="value" {% if not is_social %}title="Export to BigQuery is only available with a Google Account."{% endif %}>
121121
<input type="radio" name="manifest-type" value="bq-manifest" {% if not is_social %}disabled{% endif %}> BigQuery</span>
122122
</div>
123123
<br>
@@ -133,9 +133,6 @@ <h4 class="modal-title" id="exportManifestModal">Export Cohort Manifest</h4>
133133
<select class="form-control">
134134
</select>
135135
<br>
136-
<div id="file-part-limit-reached-message">
137-
</div>
138-
<br>
139136
</div>
140137

141138
<span><input id="include-header-checkbox" type="checkbox" checked> Include header fields (CSV and TSV only)</span>

0 commit comments

Comments
 (0)