fix force version re-check button

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2024-05-12 14:56:47 +02:00
parent 597f338353
commit a602865fee
2 changed files with 9 additions and 6 deletions

View File

@@ -7,10 +7,6 @@ export default function () {
runCheck();
}
$('#forceUpdateCheck').on('click', function () {
runCheck(1);
});
function runCheck(force = 0)
{
$.ajax({
@@ -18,7 +14,14 @@ export default function () {
type: "GET",
success: function (data) {
$("#updatecheck").html(data);
new bootstrap.Popover(document.getElementById('ucheck'));
const po = new bootstrap.Popover(document.getElementById('ucheck'));
const myPopoverTrigger = document.getElementById('ucheck')
myPopoverTrigger.addEventListener('shown.bs.popover', () => {
$('#forceUpdateCheck').on('click', function () {
runCheck(1);
po.hide();
});
})
},
error: function (request, status, error) {
console.log(request, status, error)

View File

@@ -27,6 +27,6 @@
{% endif %}
{% endif %}
<div class='d-flex justify-content-end mt-3'>
<i role='button' class='fa-solid fa-arrows-rotate' id='forceUpdateCheck' title='Force re-check of version'></i>
<span role='button' id='forceUpdateCheck' title='Force re-check of version'><i class='fa-solid fa-arrows-rotate'></i></span>
</div>
{% endmacro %}