Fix bug listing allocations when making a new server.

closes #730
This commit is contained in:
Dane Everitt 2017-11-05 14:12:53 -06:00
parent 3b5e1fc7b1
commit ac2abd89e6
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
6 changed files with 9 additions and 31 deletions

View file

@ -29,7 +29,7 @@ $(document).ready(function() {
});
$('#pNodeId').select2({
placeholder: 'Select a Node',
});
}).change();
$('#pAllocation').select2({
placeholder: 'Select a Default Allocation',
});
@ -79,14 +79,6 @@ $(document).ready(function() {
});
});
function hideLoader() {
$('#allocationLoader').hide();
}
function showLoader() {
$('#allocationLoader').show();
}
var lastActiveBox = null;
$(document).on('click', function (event) {
if (lastActiveBox !== null) {
@ -97,12 +89,9 @@ $(document).on('click', function (event) {
lastActiveBox.addClass('box-primary');
});
var curentNode = null;
var NodeData = [];
$('#pNodeId').on('change', function (event) {
$('#pNodeId').on('change', function () {
currentNode = $(this).val();
$.each(NodeData, function (i, v) {
$.each(Pterodactyl.nodeData, function (i, v) {
if (v.id == currentNode) {
$('#pAllocation').html('').select2({
data: v.allocations,