diff --git a/front/deviceDetailsTools.php b/front/deviceDetailsTools.php
index 8560974b..3da66bdb 100755
--- a/front/deviceDetailsTools.php
+++ b/front/deviceDetailsTools.php
@@ -2,7 +2,7 @@
//------------------------------------------------------------------------------
// check if authenticated
require_once $_SERVER['DOCUMENT_ROOT'] . '/php/templates/security.php';
- require $_SERVER['DOCUMENT_ROOT'] . '/php/templates/skel_tab_tools.php';
+ require $_SERVER['DOCUMENT_ROOT'] . '/php/templates/skel_device_details_tab_tools.php';
?>
diff --git a/front/js/common.js b/front/js/common.js
index 7ca9a611..006bad8f 100755
--- a/front/js/common.js
+++ b/front/js/common.js
@@ -971,22 +971,28 @@ $(document).on('click', 'a', function (e) {
function resolveSpinnerTarget(explicitTarget = null) {
if (explicitTarget) {
- return $(explicitTarget);
+ const explicit = $(explicitTarget);
+ if (explicit.length) {
+ return explicit;
+ }
}
- // Active tab pane
- const activeTab = $(".tab-pane.active .spinnerTarget").first();
- if (activeTab.length) {
- return activeTab;
+ // Prefer the active tab pane itself
+ const activePane = $(".tab-pane.active:visible");
+ if (activePane.length) {
+ // Use a direct child spinnerTarget if one exists and is visible
+ const childTarget = activePane.children(".spinnerTarget:visible").first();
+ return childTarget.length ? childTarget : activePane;
}
- // Visible container fallback
+ // Fall back to any visible spinnerTarget
const visibleTarget = $(".spinnerTarget:visible").first();
if (visibleTarget.length) {
return visibleTarget;
}
- return $();
+ // Finally, cover the page
+ return $("body");
}
function showSpinner(stringKey = "Loading", target = null) {
@@ -1001,6 +1007,10 @@ function showSpinner(stringKey = "Loading", target = null) {
const spinner = $("#loadingSpinner");
const resolvedTarget = resolveSpinnerTarget(target);
+ console.log(resolvedTarget);
+
+ console.log(`spinnerTarget=${resolvedTarget.attr("id")} class=${resolvedTarget.attr("class")} size=${resolvedTarget.outerWidth()}x${resolvedTarget.outerHeight()} parent=${resolvedTarget.parent().outerWidth()}x${resolvedTarget.parent().outerHeight()}`)
+
$("#loadingSpinnerText").text(text);
if (resolvedTarget.length) {
diff --git a/front/php/templates/skel_device_details.php b/front/php/templates/skel_device_details.php
index 0bdd0a20..93abf434 100644
--- a/front/php/templates/skel_device_details.php
+++ b/front/php/templates/skel_device_details.php
@@ -1,5 +1,5 @@
-
+
@@ -48,7 +48,177 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/front/php/templates/skel_tab_details.php b/front/php/templates/skel_device_details_tab_details.php
similarity index 100%
rename from front/php/templates/skel_tab_details.php
rename to front/php/templates/skel_device_details_tab_details.php
diff --git a/front/php/templates/skel_tab_events.php b/front/php/templates/skel_device_details_tab_events.php
similarity index 100%
rename from front/php/templates/skel_tab_events.php
rename to front/php/templates/skel_device_details_tab_events.php
diff --git a/front/php/templates/skel_tab_presence.php b/front/php/templates/skel_device_details_tab_presence.php
similarity index 100%
rename from front/php/templates/skel_tab_presence.php
rename to front/php/templates/skel_device_details_tab_presence.php
diff --git a/front/php/templates/skel_tab_sessions.php b/front/php/templates/skel_device_details_tab_sessions.php
similarity index 100%
rename from front/php/templates/skel_tab_sessions.php
rename to front/php/templates/skel_device_details_tab_sessions.php
diff --git a/front/php/templates/skel_tab_tools.php b/front/php/templates/skel_device_details_tab_tools.php
similarity index 100%
rename from front/php/templates/skel_tab_tools.php
rename to front/php/templates/skel_device_details_tab_tools.php