.
This commit is contained in:
@@ -23,12 +23,22 @@
|
|||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
{% comment %} Hide the toggle button if there are no users (to add or remove) {% endcomment %}
|
{% comment %} Hide the toggle button if there are no users (to add or remove) {% endcomment %}
|
||||||
{% if current_cid_users or available_cid_users %}
|
<p>{% if current_cid_users or available_cid_users %}
|
||||||
<p><button class="toggle-all-btn">Toggle all</button></p>
|
<button class="toggle-all-btn">Toggle all</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
<button class="add-all-btn">Add all</button>
|
||||||
|
<button class="remove-all-btn">Remove all</button>
|
||||||
|
|
||||||
|
</p>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(() => {
|
$(document).ready(() => {
|
||||||
|
$(".remove-all-btn").click((el) => {
|
||||||
|
$(".current .toggle-btn").click();
|
||||||
|
});
|
||||||
|
$(".add-all-btn").click((el) => {
|
||||||
|
$(":not(.current) .toggle-btn").click();
|
||||||
|
});
|
||||||
$(".toggle-all-btn").click((el) => {
|
$(".toggle-all-btn").click((el) => {
|
||||||
$(".toggle-btn").click();
|
$(".toggle-btn").click();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -37,12 +37,23 @@
|
|||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
{% comment %} Hide the toggle button if there are no users (to add or remove) {% endcomment %}
|
{% comment %} Hide the toggle button if there are no users (to add or remove) {% endcomment %}
|
||||||
|
<p>
|
||||||
{% if current_user_users or available_user_users %}
|
{% if current_user_users or available_user_users %}
|
||||||
<p><button class="toggle-all-btn">Toggle all</button></p>
|
<button class="toggle-all-btn">Toggle all</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
<button class="add-all-btn">Add all</button>
|
||||||
|
<button class="remove-all-btn">Remove all</button>
|
||||||
|
|
||||||
|
</p>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(() => {
|
$(document).ready(() => {
|
||||||
|
$(".remove-all-btn").click((el) => {
|
||||||
|
$(".current .toggle-btn").click();
|
||||||
|
});
|
||||||
|
$(".add-all-btn").click((el) => {
|
||||||
|
$("li:not(.current) .toggle-btn").click();
|
||||||
|
});
|
||||||
$(".toggle-all-btn").click((el) => {
|
$(".toggle-all-btn").click((el) => {
|
||||||
$(".toggle-btn").click();
|
$(".toggle-btn").click();
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user