added check all box

This commit is contained in:
Hendrik
2017-01-12 11:54:56 +01:00
parent 72d3a5ad8a
commit cfa119fef0
2 changed files with 24 additions and 12 deletions

View File

@@ -6,7 +6,10 @@
box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
}
.admin-options {
.admin-actions {
display: inline-block;
margin: 10px;
vertical-align: top;
}
.admin-searchbar {
@@ -28,11 +31,6 @@
margin-right: 100px;
}
.admin-actions {
display: inline-block;
margin: 10px;
vertical-align: top;
}
.admin-users {
margin: 10px;

View File

@@ -4,6 +4,17 @@
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="astyle.css">
<title>Admin Panel</title>
<script type="text/javascript">
function checkAll(allbox) {
var checkboxes = document.getElementsByName('check1');
for (var i = 0; i < checkboxes.length; i++) {
if (checkboxes[i].type == 'checkbox') {
checkboxes[i].checked = allbox.checked;
}
}
}
</script>
</head>
<body>
<div class="content">
@@ -31,14 +42,17 @@
<input type="submit" value="Confirm">
</div>
</div>
<br>
<div class="admin-users">
<h2>Users:</h2>
<table class="usertable">
<tr style="text-align: left;">
<th><input type="checkbox" name="checkall"></th>
<th>User</th>
<th>Ban reason</th>
<th style="width: 200px;">Action</th>
<tr>
<th class="table-checkbox">
<input type="checkbox" name="checkall" onchange="checkAll(this)">
</th>
<th class="table-username">User</th>
<th class="table-comment">Ban reason</th>
<th class="table-action">Action</th>
</tr>
<tr>
<td><input type="checkbox" name="check1"></td>