add note to artifact table when there are zero rows

This commit is contained in:
Jon Atkins 2014-02-13 20:23:12 +00:00
parent fcb1217517
commit 4d17e720ea

View File

@ -283,6 +283,11 @@ window.artifact.showArtifactList = function() {
} }
}); });
// check for no rows, and add a note to the table instead
if (tableRows.length == 0) {
html += '<tr><td colspan="2"><i>No portals at this time</i></td></tr>';
}
// sort the rows // sort the rows
tableRows.sort(function(a,b) { tableRows.sort(function(a,b) {
return a[0]-b[0]; return a[0]-b[0];
@ -291,6 +296,7 @@ window.artifact.showArtifactList = function() {
// and add them to the table // and add them to the table
html += tableRows.map(function(a){return a[1];}).join(''); html += tableRows.map(function(a){return a[1];}).join('');
html += '</table>'; html += '</table>';
}); });