More code updates
This commit is contained in:
parent
cc297eea09
commit
17642bffe7
32 changed files with 209 additions and 2863 deletions
|
@ -18,11 +18,11 @@
|
|||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
$(document).ready(function() {
|
||||
$('#pServiceId').select2({
|
||||
placeholder: 'Select a Service',
|
||||
$('#pNestId').select2({
|
||||
placeholder: 'Select a Nest',
|
||||
}).change();
|
||||
$('#pOptionId').select2({
|
||||
placeholder: 'Select a Service Option',
|
||||
$('#pEggId').select2({
|
||||
placeholder: 'Select a Nest Egg',
|
||||
});
|
||||
$('#pPackId').select2({
|
||||
placeholder: 'Select a Service Pack',
|
||||
|
@ -116,9 +116,9 @@ $('#pNodeId').on('change', function (event) {
|
|||
});
|
||||
});
|
||||
|
||||
$('#pServiceId').on('change', function (event) {
|
||||
$('#pOptionId').html('').select2({
|
||||
data: $.map(_.get(Pterodactyl.services, $(this).val() + '.options', []), function (item) {
|
||||
$('#pNestId').on('change', function (event) {
|
||||
$('#pEggId').html('').select2({
|
||||
data: $.map(_.get(Pterodactyl.nests, $(this).val() + '.eggs', []), function (item) {
|
||||
return {
|
||||
id: item.id,
|
||||
text: item.name,
|
||||
|
@ -127,9 +127,9 @@ $('#pServiceId').on('change', function (event) {
|
|||
}).change();
|
||||
});
|
||||
|
||||
$('#pOptionId').on('change', function (event) {
|
||||
var parentChain = _.get(Pterodactyl.services, $('#pServiceId').val(), null);
|
||||
var objectChain = _.get(parentChain, 'options.' + $(this).val(), null);
|
||||
$('#pEggId').on('change', function (event) {
|
||||
var parentChain = _.get(Pterodactyl.nests, $('#pNestId').val(), null);
|
||||
var objectChain = _.get(parentChain, 'eggs.' + $(this).val(), null);
|
||||
|
||||
$('#pDefaultContainer').val(_.get(objectChain, 'docker_image', 'not defined!'));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue