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