diff --git a/docs/API.md b/docs/API.md index 3abf9396..13f40646 100755 --- a/docs/API.md +++ b/docs/API.md @@ -28,6 +28,7 @@ You can access the following files: | `language_strings.json` | The content of the language_strings table, which in turn is loaded from the plugins `config.json` definitions. | | `table_custom_endpoint.json` | A custom endpoint generated by the SQL query specified by the `API_CUSTOM_SQL` setting. | | `table_settings.json` | The content of the settings table. | + | `app_state.json` | Contains the current application state. | Current/latest state of the aforementioned files depends on your settings. diff --git a/front/css/pialert.css b/front/css/pialert.css index d3e7747c..039c2ab6 100755 --- a/front/css/pialert.css +++ b/front/css/pialert.css @@ -459,35 +459,7 @@ border-right: 5px solid #606060; } -/* ----------------------------------------------------------------------------- - Spin ------------------------------------------------------------------------------ */ -.pa_semitransparent-panel { - position: absolute; - width: 100%; /*calc (100% -40px);*/ - height: 100%; - left: 0; - top: 0; - display: block; - opacity: 0.8; - background-color: #fff; - z-index: 99; -} - -.pa_spinner { - position: absolute; - left: 0; - right: 0; - top: 20px; - margin-left: auto; - margin-right: auto; - padding: 15px; - width: 200px; - - background-color: #fff; - z-index: 100; -} /* ----------------------------------------------------------------------------- Notification float banner @@ -934,3 +906,37 @@ input[readonly] { display: none; } } + +/* ----------------------------------------------------------------------------- + Spin +----------------------------------------------------------------------------- */ +.pa_semitransparent-panel { + position: absolute; + width: 100%; /*calc (100% -40px);*/ + height: 100%; + left: 0; + top: 0; + display: block; + + opacity: 0.8; + background-color: #fff; + z-index: 99; +} + +.pa_spinner { + position: fixed; + left: 0; + right: 0; + top: 100px; + margin-left: auto; + margin-right: auto; + padding: 15px; + width: 200px; + background-color: #fff; + z-index: 100; +} + +#loadingSpinner +{ + z-index: 100; +} diff --git a/front/deviceDetails.php b/front/deviceDetails.php index 9600af7a..b3cf5aa2 100755 --- a/front/deviceDetails.php +++ b/front/deviceDetails.php @@ -540,15 +540,7 @@ -
- - - +
@@ -1136,9 +1128,9 @@ function initializeCalendar () { loading: function( isLoading, view ) { if (isLoading) { - $('#loading').show(); + showSpinner() } else { - $('#loading').hide(); + hideSpinner() } } diff --git a/front/js/pialert_common.js b/front/js/pialert_common.js index 4537371b..aa4d5c52 100755 --- a/front/js/pialert_common.js +++ b/front/js/pialert_common.js @@ -534,7 +534,41 @@ function isEmpty(value) return emptyArr.includes(value) } +// ----------------------------------------------------------------------------- +// Loading Spinner overlay +// ----------------------------------------------------------------------------- +function showSpinner(stringKey='Loading') +{ + if($("#loadingSpinner")) + { + $("#loadingSpinner").show(); + } + else{ + html = ` + +
+
+
+ + + +
${getString(stringKey)}
+
+
+ ` + + $(".wrapper").append(html) + } +} +// ----------------------------------------------------------------------------- +function hideSpinner() +{ + $("#loadingSpinner").hide() +} + +// ----------------------------------------------------------------------------- // initialize +// ----------------------------------------------------------------------------- cacheSettings() cacheStrings() initDeviceListAll_JSON() diff --git a/front/php/templates/header.php b/front/php/templates/header.php index 3fe620d7..d3354373 100755 --- a/front/php/templates/header.php +++ b/front/php/templates/header.php @@ -83,9 +83,9 @@ if ($ENABLED_DARKMODE === True) {