mirror of
https://github.com/PhoenixTwoFive/karaoqueue.git
synced 2025-05-20 11:31:49 +02:00
Inprovements to entry disabling.
This commit is contained in:
parent
ac2efc29c9
commit
7629eed323
@ -43,7 +43,7 @@
|
|||||||
$(function () {
|
$(function () {
|
||||||
$('[data-toggle="tooltip"]').tooltip();
|
$('[data-toggle="tooltip"]').tooltip();
|
||||||
$('#entryToggle').change(function() {
|
$('#entryToggle').change(function() {
|
||||||
$.ajax({url: "/api/entries/accept/"+($('#entryToggle').is(":checked") ? "1" : "0"), complete: refreshEntryToggle});
|
$.ajax({url: "/api/entries/accept/"+($('#entryToggle').is(":checked") ? "1" : "0"), complete: setTimeout(refreshEntryToggle, 500)});
|
||||||
})
|
})
|
||||||
refreshEntryToggle();
|
refreshEntryToggle();
|
||||||
})
|
})
|
||||||
|
@ -56,18 +56,13 @@
|
|||||||
|
|
||||||
$("#songtable").html("")
|
$("#songtable").html("")
|
||||||
$(items.join("")).appendTo("#songtable");
|
$(items.join("")).appendTo("#songtable");
|
||||||
|
entriesAccepted()
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
$("#songtable").html("")
|
$("#songtable").html("")
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$.getJSON("/api/entries/accept", (data) => {
|
|
||||||
if (data["value"]==0) {
|
|
||||||
$("#filter").prop("disabled",true);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
$("#nameForm").submit( function (e) {
|
$("#nameForm").submit( function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
submitModal();
|
submitModal();
|
||||||
@ -114,5 +109,12 @@
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function entriesAccepted() {
|
||||||
|
$.getJSON("/api/entries/accept", (data,out) => {
|
||||||
|
$(".enqueueButton").prop("disabled",!data["value"])
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
Loading…
x
Reference in New Issue
Block a user