This commit is contained in:
gnieark 2016-05-15 14:48:46 +02:00
parent 4a76e141d1
commit 16e77e03da
3 changed files with 5 additions and 3 deletions

View File

@ -40,6 +40,8 @@ function connectFour(bot1,bot2,xd_check, newGame){
table.appendChild(tr); table.appendChild(tr);
} }
document.getElementById('fightResult').appendChild(table); document.getElementById('fightResult').appendChild(table);
var divLogs=createElem("div",{"id":"logs"});
document.getElementById('fightResult').appendChild(divLogs);
} }
//send request //send request
var xhr = Ajx(); var xhr = Ajx();

View File

@ -24,5 +24,4 @@ $bots=get_Bots_Array('connectFou');
</select> </select>
</p> </p>
<p><input type="button" value="<?php echo $lang['FIGHT']; ?>" onclick="connectFour(document.getElementById('bot1').value,document.getElementById('bot2').value,'<?php echo xd_check_input(2); ?>');"></p> <p><input type="button" value="<?php echo $lang['FIGHT']; ?>" onclick="connectFour(document.getElementById('bot1').value,document.getElementById('bot2').value,'<?php echo xd_check_input(2); ?>');"></p>
<div id="fightResult"></div><div id="logs"></div> <div id="fightResult"></div>
</article>

View File

@ -1,6 +1,7 @@
.tabledoc{border-collapse:collapse;} .tabledoc{border-collapse:collapse;}
.tabledoc tr td,.tabledoc tr th{border: 1px solid green; padding-left: 5px;} .tabledoc tr td,.tabledoc tr th{border: 1px solid green; padding-left: 5px;}
#fightResult{display:table;}
#logs{display:block;padding-left:10px; height: 200px; overflow-y: scroll;}
.battleGrid{display:table-cell; padding-left:10px; border-collapse:collapse; margin: 20px 20px 20px 20px;} .battleGrid{display:table-cell; padding-left:10px; border-collapse:collapse; margin: 20px 20px 20px 20px;}
.battleGrid tr{} .battleGrid tr{}
.battleGrid tr td{border: 1px dashed green; text-align: center; font-weight: bold;min-width:20px; height:20px;} .battleGrid tr td{border: 1px dashed green; text-align: center; font-weight: bold;min-width:20px; height:20px;}