Added no results display

This commit is contained in:
assar
2017-06-06 13:22:40 +00:00
parent 9624a012c1
commit 4eff258802
2 changed files with 21 additions and 1 deletions
+14 -1
View File
@@ -148,11 +148,24 @@ $(document).ready(function() {
newResults += '</div>';
}
newResults += '</div>';
if(data.length == 0) {
newResults = '<div class="results">';
newResults += '<h3>No results.</h3>';
newResults += '</div>';
}
$('.results').replaceWith(newResults);
}).fail(function() {
console.log( "Query failed" );
var newResults = '<div class="results">';
newResults += '<h3>No results.</h3>';
newResults += '</div>';
$('.results').replaceWith(newResults);
console.log( "Query failed" );
});
});
$('.toggle-btn').on('change', function() {
// Re-perform query
});
//$('.results-row').on('click', );
});
+7
View File
@@ -16,6 +16,13 @@ h1 {
background-color: #013A3A;
}
h3 {
color: #5E9292;
text-align: center;
padding: 12pt;
font-size: 20pt;
}
p {
text-align: center;
}