diff --git a/assets/js/serverselector.js b/assets/js/serverselector.js index f6bf45a..c720fe5 100644 --- a/assets/js/serverselector.js +++ b/assets/js/serverselector.js @@ -8,6 +8,8 @@ var serverarray function enableServerListButtons() { $('#of-connect-button').removeClass('disabled'); $('#of-connect-button').prop('disabled', false); + $('#of-editserver-button').removeClass('disabled'); + $('#of-editserver-button').prop('disabled', false); $('#of-deleteserver-button').removeClass('disabled'); $('#of-deleteserver-button').prop('disabled', false); } @@ -15,6 +17,8 @@ function enableServerListButtons() { function disableServerListButtons() { $('#of-connect-button').addClass('disabled'); $('#of-connect-button').prop('disabled', true); + $('#of-editserver-button').addClass('disabled'); + $('#of-editserver-button').prop('disabled', true); $('#of-deleteserver-button').addClass('disabled'); $('#of-deleteserver-button').prop('disabled', true); } @@ -168,6 +172,12 @@ function connectToServer() { }); } +// If applicable, deselect currently selected server. +function deselectServer() { + disableServerListButtons(); + $(".server-listing-entry").removeClass('bg-primary'); +} + $('#server-table').on('click', '.server-listing-entry', function(event) { enableServerListButtons(); $(this).addClass('bg-primary').siblings().removeClass('bg-primary'); diff --git a/index.html b/index.html index dd26b0d..45bb85e 100644 --- a/index.html +++ b/index.html @@ -39,7 +39,11 @@