Skip to content

Commit 82fa61d

Browse files
committed
-> Properly disable the citations button if there are no records for the filter set.
1 parent d33ff19 commit 82fa61d

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

static/js/filterutils.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,6 @@ define(['jquery', 'base'], function($, base) {
643643
window.handleFilterSelectionUpdate(null, true, true);
644644
}
645645

646-
647646
window.handleFilterSelectionUpdate = function(filterElem, mkFilt, doUpdate) {
648647
var promise = null
649648
if (!(filterElem ===null)) {

static/js/image_search.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,9 @@ require([
194194
base.updateDownloadBtns("cohort", true, data.totals.disk_size_tb, data.totals.SeriesInstanceUID);
195195
} else if(isFiltered && data.total <= 0) {
196196
$('#search_def_stats').html('<span style="color:red">There are no cases matching the selected set of filters</span>');
197+
base.updateDownloadBtns("cohort", false, 0, 0);
198+
$('.citations-button').attr("disabled","disabled");
199+
$('.citations-button').attr("title", "There are no cases matching the selected set of filters");
197200
} else {
198201
$('#search_def_stats').html("&nbsp;");
199202
base.updateDownloadBtns("cohort", false, 0, 0);

0 commit comments

Comments
 (0)