Skip to content

Commit

Permalink
Merge branch 'beta' of https://github.com/jeedom/plugin-luna into beta
Browse files Browse the repository at this point in the history
  • Loading branch information
Hotfirenet committed Jul 11, 2024
2 parents 25af6b6 + 5f7fc82 commit ae8143b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions desktop/js/luna.js
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,12 @@ function ajax_start_percentage() {
document.getElementById('bt_reloadConfig')?.addEventListener('click', function() {
bootbox.confirm('{{Êtes-vous sûr de vouloir recharger la configuration de Luna ?}}', function(result) {
if (result) {
window.intervalReloadAlert = setInterval(function() {
$('#div_alert').showAlert({ message: 'Configuration du plugin en cours .....', level: 'success' });
}, 2000);
var intervalConfig = setInterval(function() {
$.showLoading();
}, 1000);
$.ajax({
type: "POST",
url: "plugins/luna/core/ajax/luna.ajax.php",
Expand All @@ -417,6 +423,8 @@ document.getElementById('bt_reloadConfig')?.addEventListener('click', function()
$('#div_alert').showAlert({ message: data.result, level: 'danger' })
return
}
clearInterval(intervalReloadAlert);
clearInterval(intervalConfig);
location.reload();
}
})
Expand Down

0 comments on commit ae8143b

Please sign in to comment.