cleanup + fixes

This commit is contained in:
Jokob-sk
2024-03-10 22:41:33 +11:00
parent 78352f77b7
commit bcf4144364
2 changed files with 20 additions and 22 deletions

View File

@@ -173,8 +173,6 @@ function getSetting (key) {
function cacheStrings() function cacheStrings()
{ {
console.log("aaaaaaaaaaaaaaaaaaaaaa")
// handle core strings and translations // handle core strings and translations
var allLanguages = ["en_us", "es_es", "de_de", "fr_fr", "ru_ru", "nb_no"]; // needs to be same as in lang.php var allLanguages = ["en_us", "es_es", "de_de", "fr_fr", "ru_ru", "nb_no"]; // needs to be same as in lang.php
@@ -1066,8 +1064,6 @@ function executeOnce() {
if (!pialert_common_init) { if (!pialert_common_init) {
console.log("ffffffffffffffffffffffffffffffffffffff")
showSpinner() showSpinner()
// Your initialization code here // Your initialization code here

View File

@@ -782,31 +782,34 @@ function performLogManage() {
} }
// -------------------------------------------------------- // --------------------------------------------------------
// scroll down the log areas
function scrollDown() function scrollDown()
{ {
var anchor = getUrlAnchor() setTimeout(() => {
var anchor = getUrlAnchor()
if (anchor == "tab_Logging") console.log(anchor)
{
setTimeout(() => { if (anchor == "tab_Logging")
{
var areaIDs = ['pialert_log', 'pialert_front_log', 'IP_changes_log', 'stdout_log', 'stderr_log', 'pialert_pholus_log', 'pialert_pholus_lastrun_log', 'pialert_php_log']; var areaIDs = ['pialert_log', 'pialert_front_log', 'IP_changes_log', 'stdout_log', 'stderr_log', 'pialert_pholus_log', 'pialert_pholus_lastrun_log', 'pialert_php_log'];
for (let i = 0; i < areaIDs.length; i++) { for (let i = 0; i < areaIDs.length; i++) {
var tempArea = $('#' + areaIDs[i]); var tempArea = $('#' + areaIDs[i]);
if (tempArea.length > 0)
{
$(tempArea[0]).scrollTop(tempArea[0].scrollHeight);
}
if (tempArea.length > 0)
{
$(tempArea[0]).scrollTop(tempArea[0].scrollHeight);
} }
} }
}, 55); }, 100);
}
} }
// -------------------------------------------------------- // --------------------------------------------------------
@@ -922,8 +925,7 @@ function initializeTabs () {
window.onload = function asyncFooter() window.onload = function asyncFooter()
{ {
initializeSelectedColumns(); initializeSelectedColumns();
scrollDown();
initializeTabs(); initializeTabs();
$("#lastCommit").append('<a href="https://github.com/jokob-sk/Pi.Alert/commits" target="_blank"><img alt="GitHub last commit" src="https://img.shields.io/github/last-commit/jokob-sk/pi.alert/main?logo=github"></a>'); $("#lastCommit").append('<a href="https://github.com/jokob-sk/Pi.Alert/commits" target="_blank"><img alt="GitHub last commit" src="https://img.shields.io/github/last-commit/jokob-sk/pi.alert/main?logo=github"></a>');
@@ -935,7 +937,7 @@ window.onload = function asyncFooter()
// scroll to the latest log entrie sat teh bottom of the file // scroll to the latest log entrie sat teh bottom of the file
scrollDown();
</script> </script>