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
|
// get current URL path and assign 'active' class
|
||||||
var pathname = window.location.pathname;
|
var pathname = window.location.pathname;
|
||||||
$('.navbar-nav > li > a[href="' + pathname + '"]').parent().addClass('active');
|
$('.navbar-nav > li > a[href="' + pathname + '"]').parent().addClass('active');
|
||||||
|
$('[data-toggle="tooltip"]').tooltip()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
@ -41,11 +41,13 @@
|
|||||||
{% block extrajs %}
|
{% block extrajs %}
|
||||||
<script>
|
<script>
|
||||||
$(function () {
|
$(function () {
|
||||||
$('[data-toggle="tooltip"]').tooltip();
|
|
||||||
$('#entryToggle').change(function() {
|
$('#entryToggle').change(function() {
|
||||||
$.ajax({url: "/api/entries/accept/"+($('#entryToggle').is(":checked") ? "1" : "0"), complete: setTimeout(refreshEntryToggle, 500)});
|
$.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) {
|
function confirmDeleteEntry(name, entry_id) {
|
||||||
bootbox.confirm("Wirklich den Eintrag von "+name+" löschen?", function(result){
|
bootbox.confirm("Wirklich den Eintrag von "+name+" löschen?", function(result){
|
||||||
@ -120,6 +122,7 @@
|
|||||||
async: false
|
async: false
|
||||||
});
|
});
|
||||||
$("#entrytable").bootstrapTable('refresh')
|
$("#entrytable").bootstrapTable('refresh')
|
||||||
|
|
||||||
}
|
}
|
||||||
function markEntryAsSung(entry_id) {
|
function markEntryAsSung(entry_id) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
@ -130,6 +133,7 @@
|
|||||||
async: false
|
async: false
|
||||||
});
|
});
|
||||||
$("#entrytable").bootstrapTable('refresh')
|
$("#entrytable").bootstrapTable('refresh')
|
||||||
|
|
||||||
}
|
}
|
||||||
function DeleteSelectedEntries(ids) {
|
function DeleteSelectedEntries(ids) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
@ -143,6 +147,7 @@
|
|||||||
},
|
},
|
||||||
success: function() {
|
success: function() {
|
||||||
$("#entrytable").bootstrapTable('refresh')
|
$("#entrytable").bootstrapTable('refresh')
|
||||||
|
|
||||||
},
|
},
|
||||||
contentType: "application/json",
|
contentType: "application/json",
|
||||||
dataType: 'json'
|
dataType: 'json'
|
||||||
@ -158,13 +163,15 @@
|
|||||||
wait_dialog.modal('hide')
|
wait_dialog.modal('hide')
|
||||||
bootbox.alert({
|
bootbox.alert({
|
||||||
message: data["status"],
|
message: data["status"],
|
||||||
callback: function() {$("#entrytable").bootstrapTable('refresh')}
|
callback: function() {
|
||||||
|
$("#entrytable").bootstrapTable('refresh')
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
function TableActions (value, row, index) {
|
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() {
|
function getIdSelections() {
|
||||||
return $.map($("#entrytable").bootstrapTable('getSelections'), function (row) {
|
return $.map($("#entrytable").bootstrapTable('getSelections'), function (row) {
|
||||||
|
@ -112,7 +112,16 @@
|
|||||||
|
|
||||||
function entriesAccepted() {
|
function entriesAccepted() {
|
||||||
$.getJSON("/api/entries/accept", (data,out) => {
|
$.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