66 lines
2.2 KiB
JavaScript
66 lines
2.2 KiB
JavaScript
// Script to open and close sidebar
|
|
function w3_open() {
|
|
document.getElementById("mySidebar").style.display = "block";
|
|
document.getElementById("myOverlay").style.display = "block";
|
|
}
|
|
|
|
function w3_close() {
|
|
document.getElementById("mySidebar").style.display = "none";
|
|
document.getElementById("myOverlay").style.display = "none";
|
|
}
|
|
//acsreader accordion menu
|
|
function acsreaderAccFunc() {
|
|
var x = document.getElementById("acsreaderAcc");
|
|
if (x.className.indexOf("w3-show") == -1) {
|
|
x.className += " w3-show";
|
|
x.previousElementSibling.className += " w3-dark-grey";
|
|
} else {
|
|
x.className = x.className.replace(" w3-show", "");
|
|
x.previousElementSibling.className =
|
|
x.previousElementSibling.className.replace(" w3-dark-grey", "");
|
|
}
|
|
}
|
|
//wsen accordion menu
|
|
function wsenAccFunc() {
|
|
var x = document.getElementById("wsenAcc");
|
|
if (x.className.indexOf("w3-show") == -1) {
|
|
x.className += " w3-show";
|
|
x.previousElementSibling.className += " w3-dark-grey";
|
|
} else {
|
|
x.className = x.className.replace(" w3-show", "");
|
|
x.previousElementSibling.className =
|
|
x.previousElementSibling.className.replace(" w3-dark-grey", "");
|
|
}
|
|
}
|
|
//admin accordion menu
|
|
function adminAccFunc() {
|
|
var x = document.getElementById("adminAcc");
|
|
if (x.className.indexOf("w3-show") == -1) {
|
|
x.className += " w3-show";
|
|
x.previousElementSibling.className += " w3-dark-grey";
|
|
} else {
|
|
x.className = x.className.replace(" w3-show", "");
|
|
x.previousElementSibling.className =
|
|
x.previousElementSibling.className.replace(" w3-dark-grey", "");
|
|
}
|
|
}
|
|
|
|
function dont_panic() {
|
|
$('div').addClass('w3-spin');
|
|
}
|
|
|
|
$( document ).ready(function() {
|
|
if(typeof(EventSource) !== "undefined") {
|
|
var systemdate = new EventSource("helperpage/systemdate.php");
|
|
systemdate.onmessage = function(event) {
|
|
$("#systemdate").text("Datetime: " + event.data);
|
|
};
|
|
var systemload = new EventSource("helperpage/systemload.php");
|
|
systemload.onmessage = function(event) {
|
|
$("#systemload").text("Systemload: " + event.data);
|
|
};
|
|
} else {
|
|
$("#systemdate").text("browser not supported.");
|
|
}
|
|
});
|