Skip to content

Commit 943e7df

Browse files
committed
Merge branch 'master' of https://github.com/ImagingDataCommons/IDC-WebApp into idc-test-sp
2 parents b7f19fb + e1b0ec5 commit 943e7df

File tree

5 files changed

+36
-10
lines changed

5 files changed

+36
-10
lines changed

idc/templatetags/custom_tags.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,11 @@ def ceiling(item):
123123
return math.ceil(item)
124124

125125

126+
@register.filter
127+
def floor(item):
128+
return math.floor(item)
129+
130+
126131

127132

128133
@register.filter

static/css/style.css

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

static/js/image_search.js

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1756,13 +1756,27 @@ require([
17561756
if (data.file_parts_count > 1)
17571757
{
17581758
select_box_div.show();
1759-
for (let i = 0; i < data.file_parts_count; ++i)
1759+
for (let i = 0; i < data.display_file_parts_count; ++i)
17601760
{
17611761
select_box.append($('<option/>', {
17621762
value: i,
17631763
text : "File Part " + (i + 1)
17641764
}));
17651765
}
1766+
1767+
var file_limit_message = $('#file-part-limit-reached-message');
1768+
if (data.display_file_parts_count < data.file_parts_count)
1769+
{
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>');
1775+
}
1776+
else
1777+
{
1778+
file_limit_message.hide();
1779+
}
17661780
}
17671781
else
17681782
{
@@ -2866,7 +2880,7 @@ require([
28662880
}
28672881
else{
28682882
min = Math.floor(curmin);
2869-
max = Math.floor(curmax);
2883+
max = Math.ceil(curmax);
28702884
lower=min;
28712885
upper=max;
28722886
//$(this).attr('data-curminrng', lower);

templates/cohorts/export-manifest-modal.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,9 @@ <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>
136139
</div>
137140

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

templates/idc/explore_data_core.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,9 @@ <h4 class="panel-title">Search Configuration
178178
<div id="{{ attr.name }}" data-filter-attr-id="{{ attr.id }}" class="collapse list-group-item__body"
179179

180180
{% if attr.min_max %}
181-
data-min="{{ attr.min_max.min }}" data-max="{{ attr.min_max.max }}"
181+
data-min="{{ attr.min_max.min|floor }}" data-max="{{ attr.min_max.max|ceiling }}"
182182
data-curmin="{{ attr.min_max.min }}" data-curmax="{{ attr.min_max.max }}"
183-
data-curminrng="{{ attr.min_max.min }}" data-curmaxrng="{{ attr.min_max.max }}"
183+
data-curminrng="{{ attr.min_max.min|floor }}" data-curmaxrng="{{ attr.min_max.max|ceiling }}"
184184

185185
{% endif %}>
186186
{% comment %}
@@ -249,9 +249,9 @@ <h4 class="panel-title">Search Configuration
249249

250250
<div id="{{ attr.name }}" data-filter-attr-id="{{ attr.id }}" data-filter-display-attr="{{ attr.display_name }}" data-plotnm="{{ attr.name|plotnm }}" class="collapse list-group-item__body collapse"
251251
{% if attr.min_max %}
252-
data-min="{{ attr.min_max.min }}" data-max="{{ attr.min_max.max|ceiling }}"
253-
data-curmin="{{ attr.min_max.min }}" data-curmax="{{ attr.min_max.max|ceiling }}"
254-
data-curminrng="{{ attr.min_max.min }}" data-curmaxrng="{{ attr.min_max.max|ceiling }}"
252+
data-min="{{ attr.min_max.min|floor }}" data-max="{{ attr.min_max.max|ceiling }}"
253+
data-curmin="{{ attr.min_max.min }}" data-curmax="{{ attr.min_max.max }}"
254+
data-curminrng="{{ attr.min_max.min|floor }}" data-curmaxrng="{{ attr.min_max.max|ceiling }}"
255255
{% endif %}>
256256
<ul id="{{ attr.name }}_list" class="search-checkbox-list" style="list-style: none;">
257257
{% for val in attr.values|order_seg:attr_setK %}
@@ -316,10 +316,10 @@ <h4 class="panel-title">Search Configuration
316316
</div>
317317
<div id="{{ attr.name }}" data-filter-attr-id="{{ attr.id }}" class="collapse list-group-item__body collapse" aria-expanded="false"
318318
{% if attr.min_max %}
319-
data-min="{{ attr.min_max.min }}" data-filter-display-attr="{{ attr.display_name }}"
319+
data-min="{{ attr.min_max.min|floor }}" data-filter-display-attr="{{ attr.display_name }}"
320320
data-max="{{ attr.min_max.max|ceiling }}"
321-
data-curmin="{{ attr.min_max.min }}" data-curmax="{{ attr.min_max.max|ceiling }}"
322-
data-curminrng="{{ attr.min_max.min }}" data-curmaxrng="{{ attr.min_max.max|ceiling }}"
321+
data-curmin="{{ attr.min_max.min }}" data-curmax="{{ attr.min_max.max }}"
322+
data-curminrng="{{ attr.min_max.min|floor }}" data-curmaxrng="{{ attr.min_max.max|ceiling }}"
323323
{% endif %}>
324324
<ul id="{{ attr.name }}_list" class="search-checkbox-list" style="list-style: none;">
325325
{% for val in attr.values %}

0 commit comments

Comments
 (0)