Skip to content

Commit

Permalink
fix force version re-check button
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Kaufmann <[email protected]>
  • Loading branch information
d00p committed May 12, 2024
1 parent 597f338 commit a602865
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
13 changes: 8 additions & 5 deletions templates/Froxlor/assets/js/jquery/updatecheck.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,21 @@ export default function () {
runCheck();
}

$('#forceUpdateCheck').on('click', function () {
runCheck(1);
});

function runCheck(force = 0)
{
$.ajax({
url: "lib/ajax.php?action=updatecheck&theme=" + window.$theme + "&force=" + force,
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)
Expand Down
2 changes: 1 addition & 1 deletion templates/Froxlor/misc/version_popover.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}

0 comments on commit a602865

Please sign in to comment.