updated table layout

This commit is contained in:
Tobias 2022-01-08 17:05:35 +01:00
parent ff3799ab13
commit 53b45eeea7
2 changed files with 13 additions and 11 deletions

View File

@ -27,13 +27,13 @@
<table class="table table-sm table-hover " id="combatants"> <table class="table table-sm table-hover " id="combatants">
<thead> <thead>
<tr id="combatants-headrow"> <tr id="combatants-headrow">
<th title="Initiative">Initiative</th> <th class="col-5" title="Initiative">Initiative</th>
<th title="Name">Name</th> <th class="col-6" title="Name">Name</th>
<th></th> <th class="col-1"></th>
</tr> </tr>
</thead> </thead>
<tbody id="sortable"> <tbody class="align-middle" id="sortable">
<tr class="table-active" id="formRow"> <tr class="table-active" id="formRow">
<form name="combForm" id="combForm" onsubmit="return false;"> <form name="combForm" id="combForm" onsubmit="return false;">
<td> <td>
@ -42,10 +42,11 @@
<td> <td>
<input type="text" maxlength="40" class="form-control" id="combName" placeholder="new combatant's name" required /> <input type="text" maxlength="40" class="form-control" id="combName" placeholder="new combatant's name" required />
</td> </td>
<td width="50px"> <td>
<button type="button" class="btn btn-primary btn-sm" id="combAddButton" title="Add combatant to fight">Add</button> <div class="btn-group d-flex">
<button type="button" class="btn btn-secondary" id="combAddButton" title="Add combatant to fight">Add</button>
</div>
</td> </td>
<td width="80px"/>
</form> </form>
</tr> </tr>
</tbody> </tbody>

View File

@ -138,10 +138,11 @@ console.log("Ini is: " + ini);
'<td contenteditable="true" class="ini-editable" title="click to edit">', ini , '</td>', '<td contenteditable="true" class="ini-editable" title="click to edit">', ini , '</td>',
'<td contenteditable="true" class="name-editable" title="click to edit">', $("#combName").val(), '</td>', '<td contenteditable="true" class="name-editable" title="click to edit">', $("#combName").val(), '</td>',
'<td>', '<td>',
'<button type="button" class="btn btn-sm btn-secondary act-button" title="Complete this combatant\'s current phase and reduce ini by 10">-10</button>', '<div class="btn-group d-flex">',
'</td>', '<button type="button" class="btn btn-warning w-50 act-button" title="Complete this combatant\'s current phase and reduce ini by 10">-10</button>',
'<td>', '&nbsp;',
'<button type="button" class="btn btn-sm btn-danger remove-button" title="Remove combatant">Remove</button>', '<button type="button" class="btn btn-danger w-50 remove-button" title="Remove combatant">X</button>',
'</div>',
'</td>', '</td>',
'</tr>'].join("") '</tr>'].join("")
)); ));