Update create.php
This commit is contained in:
parent
033a5ad8b3
commit
1dbac88141
59
create.php
59
create.php
@ -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,31 +213,41 @@
|
||||
|
||||
<!-- 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();
|
||||
}
|
||||
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)); )
|
||||
document.getElementById("thowtoplay").innerHTML = document.getElementById("howtoplay").value;
|
||||
}
|
||||
|
||||
*/
|
||||
function updateDescription() {
|
||||
document.getElementById("carddescription").innerHTML = $('#description').val();
|
||||
function createMenuItem(name) {
|
||||
let li = document.createElement('li');
|
||||
li.textContent = name;
|
||||
return li;
|
||||
}
|
||||
|
||||
function updateGoodRoles() {
|
||||
let goodRoles = document.getElementById('rolecolor').value;
|
||||
goodRoles.forEach(element => document.getElementById("tplaysbestwith").appendChild(createMenuItem(element)));
|
||||
}
|
||||
|
||||
function updateDescription() {
|
||||
document.getElementById("carddescription").innerHTML = document.getElementById("description").value;
|
||||
}
|
||||
|
||||
function updateColor() {
|
||||
|
||||
let color = document.getElementById('rolecolor');
|
||||
let color = document.getElementById('rolecolor');
|
||||
let strength = document.getElementById("carddescription");
|
||||
let modifier = document.getElementById("modifier");
|
||||
let textcolor = document.getElementById("tcolor");
|
||||
@ -247,11 +257,8 @@
|
||||
modifier.removeAttribute('disabled');
|
||||
|
||||
if (color.value === "transparent" || color.value === "black" || color.value === "white") {
|
||||
modifier.value = "";
|
||||
modifier.setAttribute('disabled', '');
|
||||
|
||||
modifier.value = "";
|
||||
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() {
|
||||
|
Loading…
Reference in New Issue
Block a user