* Waste logo on every page

* username displayed right on every page
This commit is contained in:
lukas-heiligenbrunner 2020-01-12 11:23:47 +01:00
parent 7c8a0d3018
commit 86dc38a8da
8 changed files with 93 additions and 81 deletions

View File

@ -23,7 +23,7 @@
<aside class="main-sidebar sidebar-dark-primary elevation-4">
<!-- Brand Logo -->
<a href="dashboard.html" class="brand-link">
<img src="lib/AdminLTE/dist/img/AdminLTELogo.png"
<img src="/favicon.png"
alt="AdminLTE Logo"
class="brand-image img-circle elevation-3"
style="opacity: .8">

View File

@ -45,7 +45,7 @@
<aside class="main-sidebar sidebar-dark-primary elevation-4">
<!-- Brand Logo -->
<a href="dashboard.html" class="brand-link">
<img src="lib/AdminLTE/dist/img/AdminLTELogo.png" alt="AdminLTE Logo"
<img src="/favicon.png" alt="AdminLTE Logo"
class="brand-image img-circle elevation-3"
style="opacity: .8">
<span class="brand-text font-weight-light">Waste Control</span>
@ -271,5 +271,7 @@
<script src="lib/AdminLTE/plugins/sweetalert2/sweetalert2.all.js"></script>
<script src="js/userManager.js"></script>
</body>
</html>

View File

@ -47,7 +47,7 @@
<aside class="main-sidebar sidebar-dark-primary elevation-4">
<!-- Brand Logo -->
<a href="dashboard.html" class="brand-link">
<img src="lib/AdminLTE/dist/img/AdminLTELogo.png" alt="AdminLTE Logo"
<img src="/favicon.png" alt="AdminLTE Logo"
class="brand-image img-circle elevation-3"
style="opacity: .8">
<span class="brand-text font-weight-light">Waste Control</span>
@ -440,12 +440,16 @@
<script type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.4.1/js/bootstrap-datepicker.min.js"></script>
<script type="text/javascript" src="js/dashboard.js"></script>
<!-- DataTables -->
<script src="lib/AdminLTE/plugins/datatables/jquery.dataTables.js"></script>
<script src="lib/AdminLTE/plugins/datatables-bs4/js/dataTables.bootstrap4.js"></script>
<script src="lib/AdminLTE/plugins/sweetalert2/sweetalert2.all.js"></script>
<!-- OWN -->
<script type="text/javascript" src="js/dashboard.js"></script>
<script src="js/userManager.js"></script>
</body>
</html>

View File

@ -45,7 +45,7 @@
<aside class="main-sidebar sidebar-dark-primary elevation-4">
<!-- Brand Logo -->
<a href="dashboard.html" class="brand-link">
<img src="lib/AdminLTE/dist/img/AdminLTELogo.png" alt="AdminLTE Logo"
<img src="/favicon.png" alt="AdminLTE Logo"
class="brand-image img-circle elevation-3"
style="opacity: .8">
<span class="brand-text font-weight-light">Waste Control</span>
@ -288,6 +288,7 @@
<script src="lib/AdminLTE/plugins/sweetalert2/sweetalert2.all.js"></script>
<script src="js/userManager.js"></script>
<script src="js/device.js"></script>
</body>
</html>

View File

@ -1,6 +1,6 @@
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<head>
<meta charset="utf-8">
<title>Login Page</title>
<!--Made with love by Mutiullah Samim -->
@ -18,7 +18,8 @@
<script src="lib/bootstrap.min.js"></script>
<!--Fontawesome CDN-->
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css"
integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
<!--Custom styles-->
<link rel="stylesheet" type="text/css" href="css/index.css">
@ -28,6 +29,8 @@
<script src="lib/AdminLTE/plugins/sweetalert2/sweetalert2.all.js"></script>
<link rel="manifest" href="/manifest.json">
<link rel="icon" type="image/png" href="/favicon.png">
</head>
<body>
<div class="container">

View File

@ -1,17 +1,4 @@
$(document).ready(function () {
console.log("page loaded");
$.post('/senddata/checkloginstate', 'action=getloginstate', function (data) {
console.log(data);
if (data.loggedin == true) {
$("#userlabel").html(" " + data.username);
if (data.permission > 0) {
$("#adminpanel").show();
}
} else {
$("#userlabel").html(" not logged in!!");
}
}, 'json');
//load total collections
$.post('/senddata/wastedata', 'action=getStartHeaderData', function (data) {
console.log(data);
@ -27,7 +14,7 @@ $(document).ready(function () {
//load version footer
//
$.post('/senddata/wastedata', 'action=getversionandbuildtime', function (data) {
$("#version-footer-label").html("<b>Version</b> "+data.version+" <b>Build</b> "+data.buildtime);
$("#version-footer-label").html("<b>Version</b> " + data.version + " <b>Build</b> " + data.buildtime);
}, 'json');
@ -156,11 +143,11 @@ $(document).ready(function () {
});
}
datetable = $("#table-pickupdates").DataTable({
"order": [[ 3, "asc" ]]
} );
"order": [[3, "asc"]]
});
//todo picupdates-tablebody
},"json");
}, "json");
}
reloadtable();
@ -274,7 +261,7 @@ $(document).ready(function () {
dropdata.html("");
console.log("clickeeeed");
$.post('/senddata/newdate', 'action=gettypes&cityname=' + $("#dropdown-city").html()+'&zonename='+$("#dropdown-zone").html(), function (data) {
$.post('/senddata/newdate', 'action=gettypes&cityname=' + $("#dropdown-city").html() + '&zonename=' + $("#dropdown-zone").html(), function (data) {
console.log(data);
if (data.query == "ok") {
for (var i = 0; i < data.data.length; i++) {
@ -291,7 +278,6 @@ $(document).ready(function () {
});
});

View File

@ -0,0 +1,14 @@
$(document).ready(function () {
console.log("page loaded");
$.post('/senddata/checkloginstate', 'action=getloginstate', function (data) {
console.log(data);
if (data.loggedin == true) {
$("#userlabel").html(" " + data.username);
if (data.permission > 0) {
$("#adminpanel").show();
}
} else {
$("#userlabel").html(" not logged in!!");
}
}, 'json');
});

View File

@ -45,7 +45,7 @@
<aside class="main-sidebar sidebar-dark-primary elevation-4">
<!-- Brand Logo -->
<a href="dashboard.html" class="brand-link">
<img src="lib/AdminLTE/dist/img/AdminLTELogo.png" alt="AdminLTE Logo"
<img src="/favicon.png" alt="AdminLTE Logo"
class="brand-image img-circle elevation-3"
style="opacity: .8">
<span class="brand-text font-weight-light">Waste Control</span>
@ -289,5 +289,7 @@
<script src="lib/AdminLTE/plugins/sweetalert2/sweetalert2.all.js"></script>
<script src="js/userManager.js"></script>
</body>
</html>