mirror of
https://github.com/PhoenixTwoFive/karaoqueue.git
synced 2025-05-20 11:31:49 +02:00
Fix tooltips
This commit is contained in:
parent
7629eed323
commit
9f80e3eb81
@ -103,6 +103,7 @@
|
||||
// get current URL path and assign 'active' class
|
||||
var pathname = window.location.pathname;
|
||||
$('.navbar-nav > li > a[href="' + pathname + '"]').parent().addClass('active');
|
||||
$('[data-toggle="tooltip"]').tooltip()
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
|
@ -41,11 +41,13 @@
|
||||
{% block extrajs %}
|
||||
<script>
|
||||
$(function () {
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
$('#entryToggle').change(function() {
|
||||
$.ajax({url: "/api/entries/accept/"+($('#entryToggle').is(":checked") ? "1" : "0"), complete: setTimeout(refreshEntryToggle, 500)});
|
||||
})
|
||||
refreshEntryToggle();
|
||||
refreshEntryToggle()
|
||||
$("#entrytable").bootstrapTable().on('load-success.bs.table', function() {
|
||||
$('[data-toggle="tooltip"]').tooltip()
|
||||
})
|
||||
})
|
||||
function confirmDeleteEntry(name, entry_id) {
|
||||
bootbox.confirm("Wirklich den Eintrag von "+name+" löschen?", function(result){
|
||||
@ -120,6 +122,7 @@
|
||||
async: false
|
||||
});
|
||||
$("#entrytable").bootstrapTable('refresh')
|
||||
|
||||
}
|
||||
function markEntryAsSung(entry_id) {
|
||||
$.ajax({
|
||||
@ -130,6 +133,7 @@
|
||||
async: false
|
||||
});
|
||||
$("#entrytable").bootstrapTable('refresh')
|
||||
|
||||
}
|
||||
function DeleteSelectedEntries(ids) {
|
||||
$.ajax({
|
||||
@ -143,6 +147,7 @@
|
||||
},
|
||||
success: function() {
|
||||
$("#entrytable").bootstrapTable('refresh')
|
||||
|
||||
},
|
||||
contentType: "application/json",
|
||||
dataType: 'json'
|
||||
@ -158,13 +163,15 @@
|
||||
wait_dialog.modal('hide')
|
||||
bootbox.alert({
|
||||
message: data["status"],
|
||||
callback: function() {$("#entrytable").bootstrapTable('refresh')}
|
||||
callback: function() {
|
||||
$("#entrytable").bootstrapTable('refresh')
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
function TableActions (value, row, index) {
|
||||
return "<button type='button' class='btn btn-success' data-toggle=\"tooltip\" data-placement=\"top\" title=\"Als gesungen markieren\" onclick='markEntryAsSung("+row.ID+")'><i class=\"fas fa-check\"></i></button> <button type='button' class='btn btn-danger' data-toggle=\"tooltip\" data-placement=\"top\" title=\"Eintrag löschen\" onclick='confirmDeleteEntry(\""+row.Name+"\","+row.ID+")'><i class=\"fas fa-trash\"></i></button>";
|
||||
return "<button type=\"button\" class=\"btn btn-success\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"Als gesungen markieren\" onclick=\"markEntryAsSung("+row.ID+")\"><i class=\"fas fa-check\"></i></button> <button type=\"button\" class=\"btn btn-danger\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"Eintrag löschen\" onclick=\"confirmDeleteEntry('"+row.Name+"',"+row.ID+")\"><i class=\"fas fa-trash\"></i></button>";
|
||||
}
|
||||
function getIdSelections() {
|
||||
return $.map($("#entrytable").bootstrapTable('getSelections'), function (row) {
|
||||
|
@ -56,7 +56,7 @@
|
||||
|
||||
$("#songtable").html("")
|
||||
$(items.join("")).appendTo("#songtable");
|
||||
entriesAccepted()
|
||||
entriesAccepted()
|
||||
});
|
||||
} else {
|
||||
$("#songtable").html("")
|
||||
@ -112,7 +112,16 @@
|
||||
|
||||
function entriesAccepted() {
|
||||
$.getJSON("/api/entries/accept", (data,out) => {
|
||||
$(".enqueueButton").prop("disabled",!data["value"])
|
||||
if(data["value"]==0) {
|
||||
$(".enqueueButton").prop("disabled",true)
|
||||
$(".enqueueButton").prop("style","pointer-events: none;")
|
||||
$(".enqueueButton").wrap("<span class='tooltip-span' tabindex='0' data-toggle='tooltip' data-placement='top'></span>" );
|
||||
$(".tooltip-span").prop("title","Eintragungen sind leider nicht mehr möglich.")
|
||||
$('[data-toggle="tooltip"]').tooltip()
|
||||
} else {
|
||||
$(".enqueueButton").prop("disabled",false)
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user