Update create.php

This commit is contained in:
Jesse James Isler 2022-03-31 13:01:07 +02:00
parent 033a5ad8b3
commit 1dbac88141

View File

@ -177,9 +177,9 @@
<i class="material-icons">code</i>Convars
</div>
<div class="collapsible-body">
<pre >Normal Role Convars (also found in ULX):
<code id="cvars"></code>
Rolespecific Convars:
<pre>Normal Role Convars (also found in ULX):
<code id="cvars"></code></pre>
<pre>Rolespecific Convars:
<code id="rcvars"></code></pre>
</div>
</li>
@ -213,28 +213,38 @@
<!-- Updatescript -->
<script>
function updateCard() {
updateName();
updateColor();
updateDescription();
updateHowToPlay();
}
function updateName() {
document.getElementById("cardname").innerHTML = $('#name').val();
document.getElementById("cardname").innerHTML = document.getElementById("name").value;
}
function updateHowToPlay() {
document.getElementById("thowtoplay").innerHTML = $('#howtoplay').val();
document.getElementById("thowtoplay").innerHTML = document.getElementById("howtoplay").value;
}
function createMenuItem(name) {
let li = document.createElement('li');
li.textContent = name;
return li;
}
/*
function updateGoodRoles() {
goodRoles = $('#goodRoles').val();
goodRoles.forEach(element => document.getElementById("tplaysbestwith").appendChild(createMenuItem(element)); )
let goodRoles = document.getElementById('rolecolor').value;
goodRoles.forEach(element => document.getElementById("tplaysbestwith").appendChild(createMenuItem(element)));
}
*/
function updateDescription() {
document.getElementById("carddescription").innerHTML = $('#description').val();
document.getElementById("carddescription").innerHTML = document.getElementById("description").value;
}
function updateColor() {
let color = document.getElementById('rolecolor');
@ -248,10 +258,7 @@
if (color.value === "transparent" || color.value === "black" || color.value === "white") {
modifier.value = "";
modifier.setAttribute('disabled', '');
strength.value = "";
strength.setAttribute('disabled', '');
} else if (color.value === "brown" || color.value === "grey" || color.value === "blue-grey") {
@ -264,6 +271,12 @@
}
</script>
<!-- Start Tab init -->
<script>
$(document).ready(function() {