Skip to content

Commit 86efeed

Browse files
classabbyampDuncaen
authored andcommitted
add message when there are no results in package search
Fixes #147
1 parent 4ae140d commit 86efeed

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

assets/js/voidsearch.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@
116116

117117
table.children().remove();
118118
if (packages.length == 0) {
119+
table.append(noResultsNotice());
119120
return;
120121
}
121122
table.append(
@@ -205,6 +206,17 @@
205206
);
206207
}
207208

209+
function noResultsNotice() {
210+
let notice = $("<tr>");
211+
return notice.append(
212+
$("<td>")
213+
.addClass("noresults")
214+
.attr("colspan", packageColumns.length)
215+
.attr("style", "font-weight:bold; padding-top: 10pt")
216+
.text("No results found.")
217+
);
218+
}
219+
208220
// Start
209221
init();
210222
}(jQuery, window, document));

0 commit comments

Comments
 (0)