summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2015-11-30 13:50:33 +0100
committerSimon Rettberg2015-11-30 13:50:33 +0100
commit123e2973f28dba48b0ec039887fe735d35325ee8 (patch)
treec9790aa75ff345e3b6ddc5e8b90ad212f9f3cad7
parentShow missing template names with all params passed (diff)
downloadslx-admin-123e2973f28dba48b0ec039887fe735d35325ee8.tar.gz
slx-admin-123e2973f28dba48b0ec039887fe735d35325ee8.tar.xz
slx-admin-123e2973f28dba48b0ec039887fe735d35325ee8.zip
JS: Use documentLoaded event where possible
-rw-r--r--templates/backup/restore.html2
-rw-r--r--templates/sysconfig/_page.html2
-rw-r--r--templates/systemstatus/_page.html28
-rw-r--r--templates/tm-callback-trigger.html2
4 files changed, 18 insertions, 16 deletions
diff --git a/templates/backup/restore.html b/templates/backup/restore.html
index 42580647..e7dadae3 100644
--- a/templates/backup/restore.html
+++ b/templates/backup/restore.html
@@ -55,7 +55,7 @@
clearTimeout(slxTimeoutId);
setTimeout(function() {
window.location.replace("index.php?do=Main&message[]=success%7Crestore-done");
- }, 2500);
+ }, 3500);
});
}
</script>
diff --git a/templates/sysconfig/_page.html b/templates/sysconfig/_page.html
index b179f7d4..1a2f64d6 100644
--- a/templates/sysconfig/_page.html
+++ b/templates/sysconfig/_page.html
@@ -223,5 +223,5 @@
if (ids.indexOf($(this).val()) >= 0) $(this).removeClass('btn-primary').addClass('btn-default');
});
}
- setTimeout(checkBuildStatus, 300);
+ document.addEventListener("DOMContentLoaded", checkBuildStatus, false);
// --></script> \ No newline at end of file
diff --git a/templates/systemstatus/_page.html b/templates/systemstatus/_page.html
index bb48258c..51aa5b55 100644
--- a/templates/systemstatus/_page.html
+++ b/templates/systemstatus/_page.html
@@ -4,7 +4,7 @@
<div class="row">
- <div class="col-md-6">
+ <div class="col-sm-6">
<div class="panel panel-default">
<div class="panel-heading">
{{lang_space}}
@@ -15,7 +15,7 @@
</div>
</div>
- <div class="col-md-6">
+ <div class="col-sm-6">
<div class="panel panel-default">
<div class="panel-heading">
{{lang_services}}
@@ -113,15 +113,17 @@
</div>
<script type="text/javascript">
- loadContent('#diskstat', '?do=SystemStatus&action=DiskStat');
- loadContent('#addresses', '?do=SystemStatus&action=AddressList');
- loadContent('#systeminfo', '?do=SystemStatus&action=SystemInfo');
- loadContent('#services', '?do=SystemStatus&action=Services');
- loadContent('#dmsd-users', '?do=SystemStatus&action=DmsdUsers');
- setTimeout(function() {
- loadContent('#dmsd-log', '?do=SystemStatus&action=DmsdLog');
- loadContent('#netstat', '?do=SystemStatus&action=Netstat');
- loadContent('#pslist', '?do=SystemStatus&action=PsList');
- loadContent('#ldadp-log', '?do=SystemStatus&action=LdadpLog');
- }, 500);
+ document.addEventListener("DOMContentLoaded", function() {
+ $('#diskstat').load('?do=SystemStatus&action=DiskStat');
+ $('#addresses').load('?do=SystemStatus&action=AddressList');
+ $('#systeminfo').load('?do=SystemStatus&action=SystemInfo');
+ $('#services').load('?do=SystemStatus&action=Services');
+ $('#dmsd-users').load('?do=SystemStatus&action=DmsdUsers');
+ setTimeout(function() {
+ $('#dmsd-log').load('?do=SystemStatus&action=DmsdLog');
+ $('#netstat').load('?do=SystemStatus&action=Netstat');
+ $('#pslist').load('?do=SystemStatus&action=PsList');
+ $('#ldadp-log').load('?do=SystemStatus&action=LdadpLog');
+ }, 300);
+ }, false);
</script>
diff --git a/templates/tm-callback-trigger.html b/templates/tm-callback-trigger.html
index 274a2246..cd03a1fe 100644
--- a/templates/tm-callback-trigger.html
+++ b/templates/tm-callback-trigger.html
@@ -11,5 +11,5 @@
setTimeout(slxCheckCallbacks, (slxCbCooldown + 1) * 1500);
}, 'text');
}
- setTimeout(slxCheckCallbacks, 500);
+ document.addEventListener("DOMContentLoaded", slxCheckCallbacks, false);
</script> \ No newline at end of file