Remove category visibility controller

This commit is contained in:
Cryptkeeper 2016-06-20 18:14:06 -05:00
parent d7e3ebc127
commit aecb45fe07
4 changed files with 5 additions and 27 deletions

View File

@ -72,11 +72,6 @@ a {
float: left;
}
/* Category controls */
#category-controller {
display: none;
}
/* Footer */
#footer {
width: 1540px;

View File

@ -35,14 +35,6 @@
<p class="text-uppercase">Source code available on <a href="https://github.com/Cryptkeeper/Minetrack">Github</a></p>
<p class="text-uppercase">Made with <span style="color: #e74c3c;">&#9829;</span> by <a href="http://cryptkpr.me">Cryptkeeper</a></p>
<br />
<div id="category-controller">
<a class="text-uppercase" onclick="setCategoriesVisible(true);">Show Categories</a> // <a class="text-uppercase" onclick="setCategoriesVisible(false);">Hide Categories</a>
</div>
</div>
</div>

View File

@ -228,8 +228,6 @@ $(document).ready(function() {
$('#big-graph-checkboxes').html('');
$('#big-graph-controls').css('display', 'none');
$('#category-controller').css('display', 'none');
$("#stat_totalPlayers").text(0);
$("#stat_networks").text(0);
@ -316,10 +314,6 @@ $(document).ready(function() {
});
socket.on('add', function(servers) {
if (Object.keys(publicConfig.categories).length > 1) {
$('#category-controller').css('display', 'block');
}
for (var i = 0; i < servers.length; i++) {
var history = servers[i];
var listing = [];

View File

@ -16,16 +16,13 @@ function setPublicConfig(json) {
createdCategories = false;
createCategories();
setCategoriesVisible(publicConfig.categoriesVisible);
}
function setCategoriesVisible(newCategoriesVisible) {
categoriesVisible = newCategoriesVisible;
if (publicConfig.categoriesVisible) {
$('.category-header').css('display', 'block');
$('.server-container').css('margin', '10px auto');
$('.category-header').css('display', (categoriesVisible ? 'block' : 'none'));
$('.server-container').css('margin', (categoriesVisible ? '10px auto' : '0 auto'));
sortServers();
sortServers();
}
}
function createCategories() {