add option to hide post tags and header
This commit is contained in:
parent
8ad34cc221
commit
bcfe40292d
|
@ -68,6 +68,22 @@ function toggle_visibility(event) {
|
||||||
post.classList.remove(vis_class[event.target.parentElement.cellIndex - 1]);
|
post.classList.remove(vis_class[event.target.parentElement.cellIndex - 1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else if (tag == 'post tags') {
|
||||||
|
for (let post of document.querySelectorAll('.post_container > .tags')) {
|
||||||
|
if (event.target.checked) {
|
||||||
|
post.classList.add(vis_class[event.target.parentElement.cellIndex - 1]);
|
||||||
|
} else {
|
||||||
|
post.classList.remove(vis_class[event.target.parentElement.cellIndex - 1]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (tag == 'post header') {
|
||||||
|
for (let post of document.querySelectorAll('.post_container > .header')) {
|
||||||
|
if (event.target.checked) {
|
||||||
|
post.classList.add(vis_class[event.target.parentElement.cellIndex - 1]);
|
||||||
|
} else {
|
||||||
|
post.classList.remove(vis_class[event.target.parentElement.cellIndex - 1]);
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
for (let post of document.querySelectorAll('.' + tag)) {
|
for (let post of document.querySelectorAll('.' + tag)) {
|
||||||
if (event.target.checked) {
|
if (event.target.checked) {
|
||||||
|
|
|
@ -30,6 +30,12 @@
|
||||||
<td>{{ tag }}</td><td><input type="checkbox" onchange="toggle_visibility(event)"></td><td><input type="checkbox" onchange="toggle_visibility(event)"></td>
|
<td>{{ tag }}</td><td><input type="checkbox" onchange="toggle_visibility(event)"></td><td><input type="checkbox" onchange="toggle_visibility(event)"></td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
<tr>
|
||||||
|
<td>post tags</td><td></td><td><input type="checkbox" onchange="toggle_visibility(event)"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>post header</td><td></td><td><input type="checkbox" onchange="toggle_visibility(event)"></td>
|
||||||
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user