diff --git a/front/events.php b/front/events.php index e6a2fe1d..72eac8e2 100755 --- a/front/events.php +++ b/front/events.php @@ -261,7 +261,7 @@ function hideEventsSkeleton() { $('#events-skeleton').fadeOut(250, function () { $(this).remove(); }); } -window.onload = function () { +window.addEventListener('load', function () { setTimeout(hideEventsSkeleton, 15000); -}; +}); diff --git a/front/pluginsCore.php b/front/pluginsCore.php index 9507e95e..cb65134c 100755 --- a/front/pluginsCore.php +++ b/front/pluginsCore.php @@ -294,6 +294,8 @@ async function getData() { generateTabs(); } catch (err) { console.error("Failed to load data", err); + hideSpinner(); + hidePluginsSkeleton(); } } @@ -865,7 +867,7 @@ function hidePluginsSkeleton() { } window.addEventListener('load', function() { - setTimeout(hidePluginsSkeleton, 15000); + setTimeout(function() { hidePluginsSkeleton(); hideSpinner(); }, 15000); }); diff --git a/front/presence.php b/front/presence.php index 08709ebc..9646de85 100755 --- a/front/presence.php +++ b/front/presence.php @@ -510,6 +510,7 @@ function getDevicesPresence (status) { }; function hidePresenceSkeleton() { + hideSpinner(); $('#presence-skeleton').fadeOut(250, function() { $(this).remove(); }); } diff --git a/front/userNotifications.php b/front/userNotifications.php index b5f146fa..1fa81314 100755 --- a/front/userNotifications.php +++ b/front/userNotifications.php @@ -221,9 +221,9 @@ function hideNotificationsSkeleton() { $('#notifications-skeleton').fadeOut(250, function () { $(this).remove(); }); } -window.onload = function () { +window.addEventListener('load', function () { setTimeout(hideNotificationsSkeleton, 15000); -}; +}); diff --git a/front/workflowsCore.php b/front/workflowsCore.php index 4437349a..f1940591 100755 --- a/front/workflowsCore.php +++ b/front/workflowsCore.php @@ -1378,6 +1378,7 @@ $(document).ready(function () { }); function hideWorkflowsSkeleton() { + hideSpinner(); $('#workflows-skeleton').fadeOut(250, function() { $(this).remove(); }); }